This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Accessing JSP under WEB-INF  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to access jsp page through URL, which is under WEB-INF folder.According to my projects requirement all JSP are under WEB-INF folder like-web/WEB-INF/JSP/login.jsp.I have tried <jsp-file> tag in .xml but its not working.Please provide me some solution.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In web.xml, give your jsp file name for eg, index.jsp like

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

try like that.

Thanks,
Gayathri.
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sameer Thapliyal

JSPs are the public part of the project and it should be outside tie WEB-INF folder.

Like in case of applet the Applet class are package out side the WEB-INF so the it can execute on the client side.

Simply you cannot put JSP inside WEB-INF folder
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Sameer Thapliyal:
I want to access jsp page through URL, which is under WEB-INF folder.According to my projects requirement all JSP are under WEB-INF folder like-web/WEB-INF/JSP/login.jsp.I have tried <jsp-file> tag in .xml but its not working.Please provide me some solution.



"It's not working" doesn't give us much in the way of information.
Are you saying you created a servlet entry with with a jsp-file attribute?
If so, did you also create a mapping for that JSP?

Typically, when the requirements specify that all JSPs are to go under WEB-INF it's because the project is using an MVC architecture. In this case, the JSPs shouldn't be accessed directly at all.

If you give us some more information about what you're trying to to we might be able to give you some more useful information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!