• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic