I'm calling a servlet from within another servlet using the URL class. The
calling servlet posts data, reads the output, and then passes on the output
to the browser. In JRun everything works fine. But on Tomcat the same
throws a java.lang.IllegalStateException

Error:
java.lang.IllegalStateException: Writer is already being used for this
request
        at
org.apache.tomcat.facade.HttpServletResponseFacade.getOutputStream(HttpServletResponseFacade.java:158)

I'm using a PrintWriter (which I get from the response object) in the
called servlet. And I've a finally block which closes the stream. Also
assign the object to null.

The calling servlet which behaves like a proxy has a PrintStream (which it
gets from it's response object). This object is used to write the output
(that it reads from the called servlet) to the browser.

I know I'm missing something fundamental here. But can't seem to figure it
out. Is Tomcat getting mixed up with two  Outputstreams/Writers? Any
ideas/comments?

Thanks.
RS


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

Reply via email to