Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

doFilter(), container callback or inline or both ??  RSS feed

Nash Jetts
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This refers to HFSJ, Chapter 13, Coffee Cram, Q1 (p. 700)-

Option c on the question says "The doFilter method is always a container callback method" and the handwritten notes on it say "Option c is incorrect, doFilter is both a callback and an inline method"

Can anybody please elaborate what is meant by container callback and inline. Why is destroy (option b) always a callback while doFilter can be online? I didn;t see any changes to this in HFSJ errata, so I am assuming this question and the answer is correct.

I think, this means that doFilter can be called by the container and also by another filter using a FilterChain.doFilter(). Does that sound convincing?

Here's another post on this- . This one has been around for quite a while (posted Sep 16, 2004) so I just thought of adding my notes as a new post.

Thanks in advance,

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!