aspose file tools*
The moose likes Servlets and the fly likes Moving resources under WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Moving resources under WEB-INF" Watch "Moving resources under WEB-INF" New topic
Author

Moving resources under WEB-INF

Ronen Malka
Greenhorn

Joined: Aug 23, 2012
Posts: 1
I have a web application that contains hundreds of html, js and image files. These files are located under the root directory:



These folders contain some subfolders.

From a security reason I need to move all these resources under the WEB-INF folder so they will not be directly accessible.

Currently JSP and servlet files are already under the WEB-INF folder.

What is the easiest method for me to safely move all html/js/images folders under the WEB-INF without breaking all links/forwarding to resources in these folders and make sure these resources are not directly accessible?

I am using Websphere and weblogic servers.
prasad guna
Ranch Hand

Joined: Feb 12, 2009
Posts: 43

Hi Ronan
while web page is loading Images,js and css files are getting downloaded to the browser .so if you restrict or providing the security to those files your web page will load without images,js and CSS. we cannot hide those from the server.




Prasath.G
SCJP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Resources that must be loaded by the browser such as images, stylesheets and script files cannot be hidden under WEB-INF.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Moving resources under WEB-INF