• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can a jsp include pdfs?  RSS feed

 
Ashok Kumar Babu
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
GS Chidam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can mention the path of pdf file, where physically stored in the server
 
Ashok Kumar Babu
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... 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).
 
Ashok Kumar Babu
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!