This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Servlets and the fly likes what is the work of web.xml in WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "what is the work of web.xml in WEB-INF" Watch "what is the work of web.xml in WEB-INF" New topic
Author

what is the work of web.xml in WEB-INF

Farrukhalee Khan
Greenhorn

Joined: Nov 29, 2002
Posts: 1
when we prepare a website for hosting. The WEB-INF folder need web.xml. why? (that have differant packages/or pool connection packages)
and what would be contain of it. or where can i get it.
plz urgent....
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
The short answer is because the Servlet and JSP specs require it. However, you would probably get a more complete answer in the Servlet forum, which is where I'm moving this.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12324
    
    1
The Java servlet and JSP APIs use web.xml to define just about everything in a web application environment. You have to create one youself. Go to java.sun.com and download the servlet and JSP APIs in PDF form. You can start here:
http://java.sun.com/products/servlet/
Bill


Java Resources at www.wbrogden.com
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
You don't really need to put anything in the web.xml other than the standard header lines and the < web-app > tags. But you do have to have a web.xml.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: what is the work of web.xml in WEB-INF
 
Similar Threads
Attribute Listener
WEB-INF and web.xml
Newcommer To Servlets!
Mock exam question
Request Resource not available.