Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doFilter must invoke chain.doFilter()?

 
sudheer kiran
Ranch Hand
Posts: 237
Firefox Browser MyEclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in HFSJ one tiome they doFilter() must invoke chain.doFilter() method and i remember some where in that text they say
its not a need.

please calirify my doubt
doFilter() must invoke chain.doFilter() ot not.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javadocs of the doFilter method answer this question.
 
Rob Spoor
Sheriff
Pie
Posts: 20744
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually it does call chain.doFilter, but it's not required to do so. If the filter (e.g. one that checks for user logins) determines that the regular filter flow should not be followed but the request should be redirected (e.g. to some login page) than it should skip the chain.doFilter call.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic