O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coffee Cram: Chapter 13 Answers

  1. Which are true about filters? (Choose all that apply.)

    (Servlet v2.4 section 6)

    A.

    A filter can act on only the request or response object, not both.

    B.

    The destroy method is always a container callback method.

    C.

    The doFilter method is always a container callback method.

    D.

    The only way a filter can be invoked is through a declaration in the DD.

    E.

    The next filter in a filter chain can be specified either by the previous filter or in the DD.

    Note

    -Option C is incorrect, doFilter is both a callback and an inline method.

    -Option E is incorrect, the order of filter execution is always determined in the DD.

  2. Which are true about declaring filters in the DD? (Choose all that apply.)

    (Servlet v2.4 section 6)

    A.

    Unlike servlets, filters CANNOT declare initialization parameters.

    B.

    Filter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required