tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22141] New: - response wrapper not being used in filtering an error-page
Date Tue, 05 Aug 2003 16:50:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22141>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22141

response wrapper not being used in filtering an error-page

           Summary: response wrapper not being used in filtering an error-
                    page
           Product: Tomcat 4
           Version: 4.1.27
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Connector:Coyote HTTP/1.1
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jrostosk@learningpatterns.com


I have written a simple compression filter that provides a response wrapper as 
a stand-in for the 'real' response object, using HttpServletResponseWrapper as 
its superclass.  I gzip the response data before it is sent to the client.

This response wrapper is being used for all requests to the web-app EXCEPT 
those which trigger a 404 -- I have mapped an error-page to 404.  In that case, 
org.apache.coyote.tomcat4.CoyoteResponseFacade is being used instead of the 
resonse wrapper object.  The log file shows an IllegalStateException: 
getOutputStream() has already been called for this response -- this is 
generated by /jsp/404.jsp's implementation servlet.

NOTE that pointing browser directly at /jsp/404.jsp results in correct 
behavior, i.e., the response wrapper is being used.

web.xml:
filter-mapping set to /*
error-page error-code is 404
error-page location is /jsp/404.jsp

Mime
View raw message