I use the ServletOutputStream because I need to write binary directly in the 
response while with the PrintWriter I can only write character text to the 
client.
I don't understand the reason for this exception since I don't use the JsonView 
class for the requests that return a binary as output. 

-----Original Message-----
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: giovedì 28 maggio 2009 15.15
To: Tomcat Users List
Subject: RE: Tomcat does not respond

> From: Diego Castorina [mailto:di...@quince.nl]
> Subject: RE: Tomcat does not respond
> 
> SEVERE: Servlet.service() for servlet springapp threw exception
> java.lang.IllegalStateException: getOutputStream() has already been
> called for this response
> at org.apache.catalina.connector.Response.getWriter(Response.java:604)
> at 
> org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
> at 
> org.springframework.web.servlet.view.json.JsonView.renderMergedOutputModel(JsonView.java:60)

It would seem like the first thing you need to do is fix your webapp so it 
doesn't provoke the above error.  If Spring intends to use the Writer 
associated with the Response object, you cannot use the OutputStream (and vice 
versa).  Fix the other parts of your webapp to use Response.getWriter(), not 
Response.getOutputStream().

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Diego Castorina | quince
------------------------------------------
mobile  
e-mail  di...@quince.nl
web     www.quince.nl
------------------------------------------
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopiëren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to