File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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:
subject: web.xml tags
It's not a secret anymore!