File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Where should i store .jsp pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Where should i store .jsp pages" Watch "Where should i store .jsp pages" New topic
Author

Where should i store .jsp pages

Vivek Saxena
Ranch Hand

Joined: Apr 24, 2002
Posts: 58
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

Joined: Oct 17, 2001
Posts: 4313

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 ]

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Where should i store .jsp pages