File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Adding a Plugin - Jsp in pages folder" Watch "Adding a Plugin - Jsp in pages folder" New topic
Author

Adding a Plugin - Jsp in pages folder

Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Hello,

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

http://localhost:8080/strutstutorial/WEB-INF/ast/plugin.jsp

Rgds,

Seetesh
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 ]

Merrill
Consultant, Sima Solutions
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Adding a Plugin - Jsp in pages folder
 
Similar Threads
How to set server.xml?
Tomcat Installation
HELP ME.... PLEASE
Acccess denied
Jsp page in WEB-INF