Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why servlet-name tag is there?  RSS feed

 
Pranav Pal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why cannot

be replaced by


Why is the need of <servlet-name> tag?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first one declares your servlet.

The second one creates a mapping for your servlet.
You can have multiple mappings that point to the same servlet.
You can also declare a servlet with a jsp-file instead of a servlet class.
You can also have multiple servlet entries with the same servlet class (and different configurations).

All of this would be hard to express in a singe tag.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!