Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where should i store .jsp pages

 
Vivek Saxena
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have very simple question. could someone please help me or provide me some direction so that i can better understand the concept?
Q.
where should i keep all the web component (like jsp page, htmlpage, etc..)? what is the best practice in real world?
should i put them under the root directory of my web application? or should i create a directory under root directory? or should i put then under the "web-inf" directory?
I have an idea that if we put our jsp pages under "web-inf" directory then they are secured, no one can directly access them.
But i don't know how and is it a good idea to put jsp pages in "web-inf" directory?

please do help me!

Thanks
Vivek
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vivek Saxena:
Q.
where should i keep all the web component (like jsp page, htmlpage, etc..)? what is the best practice in real world?
should i put them under the root directory of my web application? or should i create a directory under root directory? or should i put then under the "web-inf" directory?
I have an idea that if we put our jsp pages under "web-inf" directory then they are secured, no one can directly access them.
But i don't know how and is it a good idea to put jsp pages in "web-inf" directory?

You've got it -- Don't put your JSP/HTML/Images or other content you want served up in your web application in the WEB-INF directory -- like you said, they will be secured and will not be accessible.
The standard structure for a Web App is this:
Things with a * are required locations... things without are more suggested best practices....

[ May 09, 2002: Message edited by: Jessica Sant ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic