Forums Register Login

Can a jsp include pdfs?

+Pie Number of slices to send: Send
I want to display a pdf file when a user clicks the Link. so i have put a Href as



Will it work? or how can i refer a file which is in the Local drive instead of the deployed Application.

Thanks
Ashok
+Pie Number of slices to send: Send
you can mention the path of pdf file, where physically stored in the server
+Pie Number of slices to send: Send
Can i refer a file which is not in the Server, instead of that its in a local drive. Anything like this?




See the reason behind the question the application will generate a new File(think it as a PDF) which i need to save in a Local Disk which in turn used by the Jsps. I cannot save it in my Application which is deployed as a war in the JBoss Server.

Any Solutions?

Thanks
Ashok
+Pie Number of slices to send: Send
... another example of someone trying to have a serverside application write a file directly to the client computer ...

It's not going to work, and you don't need to write anything to disk (you can just stream the PDF data from a servlet).
+Pie Number of slices to send: Send
Thanks Jeroen

I got the point.

Display the data from the Stream instead of saving in a local disk. Sounds good.

But i also want to know how a jsp will refer another File(or Data) which not belongs to the Application(war file).

Thanks a Lot for your Reply.
+Pie Number of slices to send: Send
 

Originally posted by Ashok Kumar Babu:
Thanks Jeroen

I got the point.

Display the data from the Stream instead of saving in a local disk. Sounds good.

But i also want to know how a jsp will refer another File(or Data) which not belongs to the Application(war file).

Thanks a Lot for your Reply.





No, you would need to write your own code for streaming the file to the browser if the file doesn't reside within the web application.
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1037 times.
Similar Threads
help about HttpServletResponse change header
Problem in displaying files in browser
Problem with YUI tabs while populating pdf's
Using form properties in an html:link tag
Change title (IE7.0 now, IE8 later) instead of URL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:53:05.