Jump to content
We've recently updated our Privacy Statement, available here ×

Error when generating PDF in Websphere


Recommended Posts

By: Michel - micheljr

Error when generating PDF in Websphere

2003-05-16 06:46

I'm using Websphere/Windows and the log error message is:

com.ibm.servlet.engine.srt.WriteBeyondContentLengthException

 

Note: when I run my App using JBoss, everything works well.

 

 

This is a short piece of my code (printPDFDoc.jsp):

 

byte[] bytes =

JasperRunManager.runReportToPdf(

reportFile.getPath(),

parameters,

);

 

response.setContentType("application/pdf");

response.setContentLength(bytes.length);

response.setHeader("Cache-Control", "no-cache");

ServletOutputStream ouputStream = response.getOutputStream();

ouputStream.write(bytes, 0, bytes.length);

ouputStream.flush();

ouputStream.close();

 

 

 

Any ideas???

 

Thanks in advance

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Error when generating PDF in Websphere

2004-03-30 11:35

 

Hi,

 

I think this is a Websphere related problem.

I have searched with Google and found something here:

 

http://www.snug.nl/home/newsletter.nsf/0/dc271ce69590ae08c1256d5e0059ab3a?OpenDocument

 

I hope this helps.

Teodor

Link to comment
Share on other sites

  • 4 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...