doFilter(), container callback or inline or both ??
posted 11 years ago
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-http://www.coderanch.com/t/168121/java-Web-Component-SCWCD/certification/Container-callback-inline-methods . 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.