• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Response object in Filters

 
satyam bobba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose the filter is mapped to servlet and after executing the servlet the response object is goes directly to container or it goes through the filter.

For request flow
Container -> filter -> servlet

For response flow

Servlet->filter->container -- With response wrapper implemention
Or
Servlet -> container � -- Without response wrapper implemention


The above mention response flow is ok?

What is the behavior of response object in the filter with or without implementing wrapper?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand your flow, sorry
But I think that filters are only called on upon incoming requests.
So your first flow seems ok.
During the incoming request process, you may wrap something around the response object, but this is not part of the response flow. It is still the request flow :

Container -> filter (do something in the request, do something in the response) -> servlet
 
satyam bobba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After executing the servlet the response object goes through the filter.Is it true in all the cases wheather the response object implemented the wrapper?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that the response object goes through the filter after executing the servlet. Could you tell me where you have read this ?
 
satyam bobba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFSJ book - page 683
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic