*
The moose likes Servlets and the fly likes Allow index.jsp but disallow access to any other jsp's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Allow index.jsp but disallow access to any other jsp Watch "Allow index.jsp but disallow access to any other jsp New topic
Author

Allow index.jsp but disallow access to any other jsp's

Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
I have this in my web.xml:


Is there a way I can allow access to index.jsp, but block access to any other jsp? Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60755
    
  65

A frequent means to accomplish this that doesn't require any configuration is to place index.jsp at the web app root, and to place all others in the folder structure under WEB-INF.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Allow index.jsp but disallow access to any other jsp's
 
Similar Threads
related to auth constraint
JSP help
web.xml security-constraint question
Tips on form-based authetication
Disallow access to *.jsp