Women in Technology

Hear us Roar



Article:
  Two Servlet Filters Every Web Application Should Have
Subject:   GZIPResponseWrapper produces no output
Date:   2004-05-21 06:55:38
From:   Gunnar
Hello,
I have downloaded the latest version of the GZIP compression filter, but I am still getting the following problem.


[I am using Struts 1.1 (don't know if this has anything to do with my problem).]


When I try to compress plain HTML files, all I see are the HEAD and BODY tags. However, the contents of these tags remain empty.


This is my web.xml:


<filter>
<filter-name>Compress</filter-name>
<filter-class>de.ruv.ruvde.filters.CompressResponseFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>Access Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Compress</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Compress</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Compress</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>


The compression for *.do work fine. But as soon as I try to download a pure HTML file, the page displayed remains empty.


Any ideas?


Thanks in advance,
Gunnar


Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • GZIPResponseWrapper produces no output
    2007-07-20 07:34:54  ManfredJS [View]

    Hi,

    I'm experiences the same kind of problems.

    In our STRUTS web application, we're using the netspade-compression-filter-1.0.jar. Running under Websphere Application Server 5.1, this works fine.

    We've now converted our application to Websphere Application Server 6.1 (compiled in JDK 1.5).

    The compression filter is not working correctly.
    Directly calling a jsp-file fails (only part of the HTML is produced till the end </HEAD> tag).
    The index.jsp (accessed when going into the application using the URL/contextroot, forwards to another jsp. This jsp is shown correctly, but when using forwards to other STRUTS actions, an HTTP 500 occurs.

    Anybody had these problems before and solved them?

    Netspade seems to have died out, so I will try the GZIPFilter in the jspbook.jar and see if this will solve the issue.

    Kind regards,
    Manfred
  • GZIPResponseWrapper produces no output
    2004-10-20 08:54:10  saikinnera [View]

    Hi Gunnar,
    I am trying to implement GZIP compression in ourapplication which uses struts1.1 version. I am getting the .jsp pages but not the .do requests even though I have included *.do as a pattern. It's giving me a FileDownLoad dialog. I am using com.jspbook.GZIPFilter. I do not know if there is any difference between this filter class and the one you are using 'de.ruv.ruvde.filters.CompressResponseFilter'. Could you please advise me on this. Any help is very much appreciated.
    Thanks