• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
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-https://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.

Thanks in advance,

Nash.
 
You can't have everything. Where would you put it?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic