You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Srinivas Sampige <sa...@mailandnews.com> on 2002/12/27 20:39:05 UTC

problem streaming file to browser

Hi
 I havene an action in which I am streaming a PDF file to the browser. I am 
doing that by doing a response.getOutputStream() in the action and writing to 
the resulting ServletOutputStream. The first time it works fine, the PDF 
appears on the browser but with an illegal state exception on the console on 
the server side. The next time the user chooses to download a file and the 
same action is run again I get an error saying that the the servlet output 
stream has already been obtained and the PDF does not appear. The user has to 
log out of the web application and then log back on for the PDF download to 
work. Could anybody give me an idea what is going wrong? What is the best way 
to code this functionality? Could somebody provide OR point me to some source 
code?

thanks
Srinivas 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>