wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes web.xml tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "web.xml tags" Watch "web.xml tags" New topic

web.xml tags

Shweta R Dhaneshwar
Ranch Hand

Joined: May 27, 2005
Posts: 35
I am new to web programing.Can anyone tell me difference between these two in the web.xml

Shweta Dhaneshwar.<br />SCJP 1.4 90%
H Singh
Ranch Hand

Joined: Apr 03, 2005
Posts: 34
It defines the mapping between the name client uses ( /org.apache.jserv.JServ ) and the actual servlet class (org.apache.tomcat.servlets.StatusServlet )

<servlet-name> tag : You will use the name (status in your case) defined here within other parts of the DD

So when a request comes in,
1.the container finds <url-pattern> that has /org.apache.jserv.JServ.
2.then container gets the <servlet-name> ( status )
3.container looks in the <servlet> tag for <servlet-name> ( status )
4. then it uses the actual <servlet-class>

hope this helps
I agree. Here's the link: http://aspose.com/file-tools
subject: web.xml tags
Similar Threads
servlet not running but examples does
Trouble Loading my First Servlet
Specifying Servlet URL
SAXException while parsing web.xml file in jboss 5.0 during deployment
Problem with web.xml (WebLogic Server 8.1 SP2) ?