tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitri Valdin" <>
Subject <jsp:include> problem with Compression Filter
Date Thu, 11 Jul 2002 10:01:08 GMT

Hello (Amy),

I have found yet another problem with compression filter.
If jsp page uses include action:

        <jsp:include page="/pageToInclude.jsp" flush="true"/>

then a new request is send to server. The result will be compressed
and then compressed once again in the calling page, which make
the result look pretty ugly ;-)

I have found a pretty simple workaround of this problem.
Include action should be extended with parameter gzip:

        <jsp:include page="/pageToInclude.jsp" flush="true">
          <jsp:param name="gzip" value="false"/>

Compression filter will check the request for this parameter
and decide if the page should be compressed or not:

            // Are we allowed to compress ?
            String s = (String) ((HttpServletRequest)request).getParameter("gzip");
            if ("false".equals(s)) {
                if (debug > 0) {
                    System.out.println("got parameter gzip=false --> don't compress, just
chain filter");
                chain.doFilter(request, response);

I have attached the modified Files to this mail. A bit more debugging info
was added to CompressionResponseStream.

Let me know if you have better idea to solve the problem.

BTW, the problem 9434 seems also to be fixed with previous check in.


Dmitri Valdin

(See attached file:


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie
nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and
destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.

View raw message