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 JSP and the fly likes Problem in opening PDF or FDF in Firefox? 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 » Java » JSP
Bookmark "Problem in opening PDF or FDF in Firefox?" Watch "Problem in opening PDF or FDF in Firefox?" New topic
Author

Problem in opening PDF or FDF in Firefox?

prem kanna
Greenhorn

Joined: Sep 10, 2008
Posts: 26
Hi all,

I am using tomcat 5.5. In one of jsp code, I have used a hyperlink to open a PDF or FDF file placed in server .My requirement is while clicking the hyperlink the PDF or FDF file should be opened in browser window itself. The file is located in remote server connected through LAN.

For eg :



When this jsp page is opened in IE and if I click on the link, PDF or FDF files is getting opened well in browser.

While clicking the link in Firefox browser, the path set in anchor tag is changed to

http://localhost:8080/ManuscriptCheck/\\123.45.6.78\XXXX/YYYY/RD\RDTEST-D-08-01178.fdf


Where http://localhost:8080/ManuscriptCheck/ is my Web application URL.

How to overcome this issue to have the file url as such without web application url appending before it?

Can Any body guide me. Thanks in advance.


Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I would take out line 5 for a start. What's the point in changing the slash characters in your URL to those malformed backslashes?
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 643
First of all, you can't force a PDF to be opened in the browser window. Users can configure the Acrobat reader application to open in the browser or not. This is not in control of the server.

Second, what is up with that URL you're creating? Aside from the backslashes, as Paul pointed out, what's up with the lack of http or https?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in opening PDF or FDF in Firefox?
 
Similar Threads
XSL-FO hyperlinks in PDF
how to open pdf files in FireFox through jsp page?
Error while urlRewritting using jstl.
document variable is nullified after servlet file download
Security error while loading pdf file in jsp in firefox?