Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why servlet-name tag is there?

 
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic