wood burning stoves
The moose likes Struts and the fly likes Adding a Plugin - Jsp in pages folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Adding a Plugin - Jsp in pages folder" Watch "Adding a Plugin - Jsp in pages folder" New topic

Adding a Plugin - Jsp in pages folder

Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244

while creating new plugins in Struts, why is it mandatory for jsp's to be in pages directory.

If I create a folder called "ast" under WEB-INF and keep the jsp page in this new folder under WEB-INF (WEB-INF\ast), I am not able to run the jsp page from the url



Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The whole reason for putting JSPs under the WEB-INF/ directory is so that they cannot be accessed directly through a URL.

The J2EE specification for web containers dictates that anything put in WEB-INF or its child directories cannot be accessible through a URL. The reasoning for putting pages there is that it isn't a good idea for a user to be able to call a JSP page directly by name. This makes it so that the only way to reach /WEB-INF/xyz.jsp is by calling an action or Servlet that forwards to it (xyzAction.do).
[ October 17, 2006: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: Adding a Plugin - Jsp in pages folder
It's not a secret anymore!