Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

web.xml tags  RSS feed

 
Shweta R Dhaneshwar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to web programing.Can anyone tell me difference between these two in the web.xml
 
H Singh
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!