tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Cosenza <rob...@gmail.com>
Subject Re: IllegalStateException: getOutputStream() has already been called for this response
Date Wed, 09 Feb 2005 13:38:39 GMT
Just don't pass the ouput stream that you get from the servlet but
create a new one.
When you are done with your business, you'll copy the one on the other.



On Wed, 9 Feb 2005 08:24:05 -0500, DAVID TURNER <DTURNER@nhbb.com> wrote:
>  
> Thanks for the advice Roberto.  I agree that the approach is wrong, but in
> my real application I definitely use the MVC pattern as much as possible.   
>  
> The problem I'm running into is that my servlet calls other classes to do
> the business logic.  One of these classes does XSLT.  What I end up doing is
> getting the OutputStream from the servlet and passing it down to the class
> that does the transformation, which sends the results of the transformation
> to this OutputStream.  Exceptions could possible occur during the
> transformation, and this is where I run into this problem of the jsp error
> page not getting called.  The use of OutputStream or Writer for the XSLT
> results is what keeps me from doing exactly what you suggested.  I have this
> one hook, so to speak. 


-- 
Roberto Cosenza
http://robcos.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message