• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request in and out of scope

 
Vrunda Joshi
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
as per the servlet specs,
"a request is defined as coming into scope when it's about to enter the first servlet or filter in each web application as going out of scope when it exits the last servlet or the first filter in the chain"

how it can be the first filter in chain?

thanks in advance
-vrunda
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Filter passes the request along with something like:
chain.doFilter(request, wrapper);

You step through all your filters this way, but that method has to return! So the request doesn't die until we've returned our way back up the filter chain and the first filter returns its doFilter method.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic