File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why servlet-name tag is there?

 
Pranav Pal
Ranch Hand
Posts: 74
  • 0
  • 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
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic