wood burning stoves 2.0*
The moose likes Servlets and the fly likes Location of web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Location of web.xml" Watch "Location of web.xml" New topic
Author

Location of web.xml

vijay kumarg
Ranch Hand

Joined: Dec 14, 2006
Posts: 105
Should I place web.xml directly under WEB-INF but NOT in a folder under WEB-INF?
I have some custom xml files, where should I place them ?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

web.xml must be in the WEB-INF folder. The location of your other files depends on how you propose to use them
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
You can put your custom xml files anywhere ,but if you put this outside WB-INF then the client can directly request that ,so put that within the WB-INF folder.If you want that to be available directly to the web app's classloader then put that in classes folder of WEB-INF.


Rahul Bhattacharjee
LinkedIn - Blog
vijay kumarg
Ranch Hand

Joined: Dec 14, 2006
Posts: 105
If you want that to be available directly to the web app's classloader then put that in classes folder of WEB-INF
.

I have an xml file Employees.xml.My application wants access to jsps based on some authentication like his/her role and other authentication info.
I f I have to access to that authentication info in a jsp how I can I able to do this ? Where should I place taht xml file ?
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Place it in the classes folder of WEB-INF , you can get a stream out of this files easily as this is available to the webapp's classloader.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Location of web.xml