Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request Filter vs Response Filters

 
Gautam Verma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Like their is request filters which are invoked before the request goes to servlet.
Is the response filter are invoked after the servlet completes?

Can anyone elaborately explain the difference between these two?
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They're actually the same thing. If you look at the documentation, you'll see that the doFilter method takes a ServletRequest and a ServletResponse as an argument. The filters will be called twice, once on the way in and once on the way out again (in reverse order).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic