aspose file tools*
The moose likes Struts and the fly likes Hiding files under WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Hiding files under WEB-INF" Watch "Hiding files under WEB-INF" New topic
Author

Hiding files under WEB-INF

Wes Sorensen
Greenhorn

Joined: Dec 02, 2005
Posts: 13
Hi All, I've decided to move my JSPs and related files under the WEB-INF directory. I've done this and setup Dreamweaver to work right. When I deploy my site, the images don't show up.

I'm wondering, should only the JSP files be under there or can all web files be under there?

I was planning to just have a index.html that automatically forwards to the Welcome.do page in the root of the webapp. Then have all JSPs, graphics, .js files, etc. under the WEB-INF/web directory.

It appears that I can't have the graphics files under there?

It's very important to me that my users not be able to call a JSP directly, therefore, I was going to come extreme measures to limit their ability to do so - lots of checking in every JSP that wouldn't need to be done if under the WEB-INF. I tried once before and ran into a roadblock - likely the same one. Anyone able to help?

Thanks so much!
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Only put JSPs under WEB-INF. gifs and such are requested separately by the browser, and the browser is not allowed to access WEB-INF.


A good workman is known by his tools.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hiding files under WEB-INF
 
Similar Threads
protecting JSPs
RedirectView question
How to Generate a War file
Accessing jsp's directly
Precompiled index.jsp - how to map to webroot?