wrapping PDF in a RequestDispatcher
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Fidel_Ramos
Posted On:   Thursday, October 17, 2002 08:51 PM

I know this may be un-elegant but is it possible?

My problem is actually : I am constructing a pdf file based on the request on a jsp [using iText]. Then, of course, have it temporarily in the server and give the pdf location. but in order to do that i have to "dispatch" it then to that pdf file. Any other way to do that?

It will be of big help if someone could give me a away of just constructing a pdf and displaying from the browser.

Re: wrapping PDF in a RequestDispatcher

Posted By:   Sean_Sullivan  
Posted On:   Monday, October 21, 2002 04:42 PM

Have you considered writing the PDF's outputstream to the Servlet's outputstream?





You will find example code here:


http://www.theserverside.com/discussion/thread.jsp?thread_id=16059

Re: wrapping PDF in a RequestDispatcher

Posted By:   Lasse_Koskela  
Posted On:   Thursday, October 17, 2002 11:07 PM

I assume that you can get some kind of a handle on the generated PDF file, right?


Could you perhaps create a FileInputStream from the PDF file and start writing that stream to the response (and set the content type prior to that of course) without any redirects?

About | Sitemap | Contact