This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes WebLogic, Cannot display PDF in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "WebLogic, Cannot display PDF in JSP" Watch "WebLogic, Cannot display PDF in JSP" New topic
Author

WebLogic, Cannot display PDF in JSP

Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
Hi,

we have a web application deployed on Oracle Application server (10.1.3.5.0). We deployed the same
app on WebLogic server (10.3.6.0) and now we have problem with displaying PDF on web page. Here is our code


WebLogic reports "File is corrupted and cannot be repaired. Local\EWH&4u}ik5v".

We have latest Acrobat Reader. Tried a few IE (have version 10) reccomendations -
increase tmp size, delete temp files on leaving IE. But nothing worked.
Do you have any experience with WebLogic ? Could it something be wrong in above code ?

Thanks
Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
I found it myself. The JSP must not contain any HTML code:


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
You should never use JSPs to stream binary content; that's what servlets are for. JSPs are for creating character output, using them for anything else is a bug waiting to happen. For example, I'm fairly certain that the PDF you downloaded does not have the same number of bytes as the original one.


Ping & DNS - my free Android networking tools app
 
 
subject: WebLogic, Cannot display PDF in JSP
 
Similar Threads
Jsp defined in error-page is not displayed
japanese not working in JRUN
problem with setContentType() method
want to open notepad from client machine
Encoding On Browser Problems