tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diego Castorina" <>
Subject RE: Tomcat does not respond
Date Thu, 28 May 2009 13:49:00 GMT
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 [] 
Sent: giovedì 28 maggio 2009 15.15
To: Tomcat Users List
Subject: RE: Tomcat does not respond

> From: Diego Castorina []
> 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(
> at org.apache.catalina.connector.ResponseFacade.getWriter(
> at org.springframework.web.servlet.view.json.JsonView.renderMergedOutputModel(

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

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:
For additional commands, e-mail:

Diego Castorina | quince
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

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 en 

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 and 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message