Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Adding a Plugin - Jsp in pages folder

 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
permaculture is giving a gift to your future self. After reading this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic