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 Tomcat and the fly likes problem opening PDF files in different browsers 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 » Tomcat
Bookmark "problem opening PDF files in different browsers" Watch "problem opening PDF files in different browsers" New topic
Author

problem opening PDF files in different browsers

Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi,
Am facing a problem in opening PDF files when migrated from Tomcat 4.1 to 5.5. In 4.1, i was able to open different PDF files in different browsers and each was having a different name. Now in Tomcat5.5, when ever i open multiple PDF files, the PDF files are opening in sinlge browser itself and when saving ,they are getting saved with a constant name.

Could any one let me know if they had come across any such problem and if so pls provide some response.

Thanks
Raj
[ June 21, 2007: Message edited by: Bear Bibeault ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How are you serving up the PDFs; just a hyperlink?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Yes,they are accessed via the hyperlink in the application browser.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If I were debugging this, the first thing I would do is use either a packet sniffer or a tool like LiveHttpHeaders (plugin for FireFox) to see what's different about the response headers when the hyperlink is clicked.

The Content-Disposition header is where the filename is suggested to the browser. The same header also suggests that the file either be shown inline or be treated as an attachment.

See if that header and the content-type headers are the same in both versions of Tomcat
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Thank zou ben,
but is there a way i can find out from the browser itself? i dnt have access to the code.

for installing live http headers,its just that i need to extract into plugins folder in mozilla ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Rajendar Goud:
Thank zou ben,
but is there a way i can find out from the browser itself? i dnt have access to the code.

for installing live http headers,its just that i need to extract into plugins folder in mozilla ?


Browsers, by default, don't show you the HTTP headers.
LiveHttpHeaders will allow you to see them.
I've always installed it by clicking on the "Install" link from their site.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, the FireBug plugin for Firefox will also show you the headers (+ a lot more).
 
Don't get me started about those stupid light bulbs.
 
subject: problem opening PDF files in different browsers
 
Similar Threads
unable to open/download files in IE but works in other browsers
File Extenssion not showing in Mozilla
session collusion problem
problem in displaying pdf files in web browser
Printing PDF files