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

On redirect and close: Cannot find message associated with key 
'responseStream.suspended'

           Summary: On redirect and close: Cannot find message associated
                    with key 'responseStream.suspended'
           Product: Tomcat 4
           Version: 4.0.3 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


[TC4.0.3, Jre 1.4.0, Linux 7.2]
If you after a redirect try to close the output stream as in:

        try {
            // Getting encoding
            String encoding = res.getCharacterEncoding();
            // Setting content type
            res.setContentType("text/html; charset=" + encoding);
            // Getting the OutputStream (just to be able to close it)
            OutputStream out = res.getOutputStream();
            // Sending the redirect
            res.sendRedirect(Configuration.getDEFAULT_MAINPAGE());
            // close output stream
            out.close();
        }
        catch (IOException e) {
            throw new ServerException("Got IOException while trying to redirect
user to ["+Configuration.getDEFAULT_MAINPAGE()+"].", e);
        }

You get weird errors. On 4.0.1, I had to do this to be sure that the client
exited, a load tester package (loadsim, Java stuff, based on some Apache stuff,
using java.net.HttpConnection or whatever it's called) I used didn't "let go"
(but the web browsers did) unless I did this.


Doing this with 4.0.3 on Sun's JRE 1.4.0 I get this error:

[Nested Exception] this: com.corelets.api.ServerException: Got IOException while
trying to redirect user to [Renderer]., nested: java.io.IOException: Cannot find
message associated with key 'responseStream.suspended'
        at com.corelets.servlets.Parameters.doCCSGet(Parameters.java:146)
        at com.corelets.servlets.CCSServlet.callServiceMethod(CCSServlet.java:698)

This is the "nested exception":

java.io.IOException: Cannot find message associated with key
'responseStream.suspended'
        at
org.apache.catalina.connector.http.HttpResponseStream.close(HttpResponseStream.java:202)
        at com.corelets.servlets.Parameters.doCCSGet(Parameters.java:143)
        at com.corelets.servlets.CCSServlet.callServiceMethod(CCSServlet.java:698)
        at com.corelets.servlets.CCSServlet.showAppropriatePage(CCSServlet.java:581)
        at com.corelets.servlets.CCSServlet.process2(CCSServlet.java:413)
        at com.corelets.servlets.CCSServlet.process(CCSServlet.java:300)
        at com.corelets.servlets.CCSServlet.doGet(CCSServlet.java:177)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

..........

Closing that stream is probably wrong, but the error wasn't exactly clear about
it. And the way it works have changed...

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

Reply via email to