Thre is no HTTP header that will affect the browser title.Originally posted by Naseem Khan:
I did lots of r&d on http headers but no luck.
Originally posted by Bear Bibeault:
When you serve the PDF, are you navigating away from the login page?
Refreshing life every moment...
Originally posted by Bear Bibeault:
Rather than having your servlet forward to the PDF, forward to a JSP or HTML page that sets the title and initiates a redirect to the PDF. That will give you the opportunity to set the title.
That's right. You cannot forward after writing output.Originally posted by Naseem Khan:
Forwarding to pdf from jsp is working only once. Second time whenI access the pdf, server throws exception...
Find out why and fix it. Your redirect shouldn't address the start of the process, just the PDF streaming portion.I tried with redirect but it puts the whole flow in infinte loop.
Originally posted by Dave Wingate:
To get the browser to list the correct "title" of the pdf, the best solution I've found is to send your redirect to MyReportNameForTitle.pdf and in web.xml map *.pdf requests to your pdf servlet. If your redirect was to "MyReportNameForTitle.pdf," then that's typically the file name that the borwser displays.
authenticate.do -> login.jsp -> login.do -> reporting.jsp
authenticate.do -> reporting.jsp
Originally posted by Naseem Khan:
But the only problem which I am facing is everytime authenticate.do gets called which puts the system in infinite loop.
Originally posted by Naseem Khan:
I want to open the pdf in the browser itself instead of as an attachment.
You have to be odd to be #1 - Seuss. An odd little ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|