my dog learned polymorphism
The moose likes Servlets and the fly likes Not showing up pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Not showing up pdf" Watch "Not showing up pdf" New topic

Not showing up pdf

Subha Rangu

Joined: Jul 23, 2004
Posts: 29
I have a question in JSP. I am trying to send the byte[] to outputstream and show it on the browser.
Following is my code:

ServletOutputStream outstream=resp.getOutputStream();


I was neither getting an Exception nor displaying the pdf document on the browser. I had printed the size of the byte[] just before giving it to the output stream and it is not null.

Please help me with me..What could be the reason?
Thanks in advance,
John Campbell

Joined: Aug 12, 2004
Posts: 4
Try setting content length also in the response object
Subha Rangu

Joined: Jul 23, 2004
Posts: 29
Thanks for the reply...
I agree. Here's the link:
subject: Not showing up pdf
It's not a secret anymore!