Reputation: 29
I'm doing a web application where I can upload and download pdf files from server.
In this I created a pdf files and stored its path on the database.
What I want is when I search by some criteria (like filename) I should get list of files from db. When I click open link it should be opened in jsp.
Downloading part was done by me. What I need is just to open a pdf in jsp.
is it possible to open server file from jsp?
Upvotes: 0
Views: 2275
Reputation: 23352
Place those files outside WEB-INF
folder and access. WEB-INF folder is secure in a Java EE environment. By placing your files inside the WebContent
folder and outside the WEB-INF folder will help you to access those files for download. You need to mention the full path for that file. E.g for an image your path will be https://localhost:9444/AppName/resources/theme/images/logo.png
Upvotes: 1