File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Problem in ServletOutputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem in ServletOutputStream" Watch "Problem in ServletOutputStream" New topic
Author

Problem in ServletOutputStream

naga eswar
Ranch Hand

Joined: Jan 25, 2012
Posts: 120
Hi all,

I am facing problem while writing byte data into ServletOutputStream.
The senerio is we are generating a PDF file by using FOP as below,




_strXslData is String which contians XSL program
_strXmlData is String which contains XML code as below



Later we are adding images to pdf with below code

naga eswar
Ranch Hand

Joined: Jan 25, 2012
Posts: 120
Later the mergedPdfsb(the genearated PDF), we are setting in DVO oNonHTMLDVO.setPdf();

Now in the below code we are facing the problem....




So at the outStream.write(readBytes); line while writing the bytes into ServletOutputStream, we are getting the exception

com.ibm.wsspi.webcontainer.ClosedConnectionException: OutputStream encountered error during write

Can any body help us please.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in ServletOutputStream
 
Similar Threads
Merging two pdfs
ServletOutputStream.write not working in IE 7
how to change existing pdf font encoding (multi language) dynamically
How to convert simple Java Code into amazon's AMI
Writing large files to the servletoutputstream in chunks