• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding a Plugin - Jsp in pages folder

 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic