• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlets

 
Asha Jagannathan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is servlet chaining frequently used in application development ? Also is the servlet tag supported by servers especially Tomcat ?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With respect to my level of knowledge on overall usage of servlet chaining, I'd say it's not used so much.
Usually (my understanding) the web layer is implemented with some kind of variation of MVC, which often means that there is only one or two servlets in a web application, which act as controllers delegating tasks to different (non-servlet) components.
Personally I've seen servlet chaining being used for authentication mostly, that is, for checking whether the user should be redirected to a login page. This is however a legacy solution. It's preferable to use declarative security via deployment descriptors (unless you really need dynamic authentication rules, etc.).
Another use for servlet chaining has been "low-level" processing of the request/response, for example gzipping the sent response, picking up access log information, etc.
These are just my views on the subject. Others may have radically different experiences.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The concept of Servelt Chaining has been replaced by Filters in the Servlet 2.3 Specification.
Filters are a much cleaner way to implement this functionality and are very useful for the types of activities that Lasse mentioned.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!