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=7725>.
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=7725

IllegalStateException during forwards to a page that redirects

           Summary: IllegalStateException during forwards to a page that
                    redirects
           Product: Tomcat 4
           Version: 4.0.4 Beta 2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


The following exception trace will appear in the catalina logs.

2002-04-03 09:58:49 HttpProcessor[8080][49] process.finish
java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END
        at
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:933)
        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
        at sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:356)
        at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:413)
        at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
        at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
        at java.io.PrintWriter.close(PrintWriter.java:137)
        at 
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:482)
        at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:237)
        at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpResponseImpl.java:287)
        at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1044)
        at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1115)
        at java.lang.Thread.run(Thread.java:536)

As far as I've been able to determine, this occurs when a filter or servlet
forwards to a page that performs a redirect AND if the forwarding includes a
response wrapper rather than the original response. For example,

httpServletRequest.getRequestDispatcher( resourcePath ).forward(
 httpServletRequest,
 new MyServletResponse( httpServletResponse )
);

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to