wood burning stoves 2.0*
The moose likes Servlets and the fly likes Filter VS controller servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Filter VS controller servlet" Watch "Filter VS controller servlet" New topic
Author

Filter VS controller servlet

mohan kumar r
Ranch Hand

Joined: Jan 19, 2006
Posts: 38
In a simple web application,i wrote one controller servet and one filter and congigure those in web.xml. My doubt is that
"both filter and controller servlet acts as interceptor of requests.if i configure the controller servlet and filter for the same request Url,whic one get executed first".


mohan
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
I believe it is the filter which will have greater precedence than the Controller servlet.

Regards
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
Right.
Before the request reaches the servlet associated to that url, it goes through all the filters chain.
HTH
 
jQuery in Action, 2nd edition
 
subject: Filter VS controller servlet
 
Similar Threads
Part 2 design question
A controller that forwards to different pages/controllers
Keeping track of the requests in a servlet
Filter vs Servlet
Front control designPattern