Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter VS controller servlet

 
mohan kumar r
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it is the filter which will have greater precedence than the Controller servlet.

Regards
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right.
Before the request reaches the servlet associated to that url, it goes through all the filters chain.
HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic