This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
In my project, currently all static resources are in a webserver. The Pdfs therefore, are accessible directly without any authentication. As a measure of security, we have been asked to move the PDFs to Appserver so that unrestricted and unauthorised download can be avoided.
As with all big portals, this project also uses Content management tools to manage static files. And the deployments from the Content Management tool has been configured only to
All static files in this above folder are mostly html, which are used by the application, through the tiles-def (portlets) I am not aware, how to access a PDF if placed in the above folder. I am required to create a relative path to the PDF which I can call from various JSPs (these relative paths to PDFs should also managed through content management tool) and I need to create a path which can access the files under WEB-INF/classes/resources/..(foldername).
Can someone please guide me to accomplish this task.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
The Ranch has a FAQ entry about this: RelativeLinks. It is well worth reading.
Joined: Jan 30, 2007
Thanks. I tried and it did not work.
I cannot try request.getContextPath in this case, as there are some 4 PDFs that needs to be listed one below the other in a JSP. And these have to be called through ICMS content ID (for frequent updating without the need to change in JSPs). The content ID does not support the method.
I shall try this suggestion, and If I am able to get the PDF then, will try and convince the business not to use content IDs for this case (as a last resort) and handle through the code. Thanks!