• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter and Wrapper question

 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,

1)
Its said that calling doFilter on FilterChain is not nessassary, suppose

F1--F2--F3--F4--Servlet

if F2 do not implement chain.doFilter() then does the Servlet will be called after F2 filter not by invoking F3 and F4?

2)
when you sub class a Wrapper is it necessary to override at least one wrapper method? i mean suppose we dont override getOutputStream() calling this wont give us a custom output stream right?

Thank You.

 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if F2 do not writhe chain.doFilter() then is Servlet will be called after F2 filter not by invoking F3 and F4?

No, the request will stop in F2, so the servlet will not be invoked.

when you sub class a Wrapper is it necessary to override at least one wrapper method? i mean suppose we dont override getOutputStream() calling this wont give us a custom output stream right?

It's not necessary to override anything. If you don't, the default behaviour described in the API will occur.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic