tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre StĂžlsvik <En...@Stolsvik.com>
Subject [TC403] "Cannot find message associated with key 'responseStream.suspended'"
Date Tue, 02 Apr 2002 14:48:26 GMT
[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. 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.


This is what I get:

[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)

..........



-- 
Mvh,
Endre


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message