This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in ServletOutputStream
 
Similar Threads
Merging two pdfs
how to change existing pdf font encoding (multi language) dynamically
Writing large files to the servletoutputstream in chunks
How to convert simple Java Code into amazon's AMI
ServletOutputStream.write not working in IE 7