Coffee Cram: Chapter 10 Answers

  1. How can a Classic tag handler instruct the container to ignore the remainder of the JSP that invoked the tag? (Choose all that apply.)

    (JSP v2.0 pg 2-56)

    A.

    The doEndTag() method should return Tag.SKIP_BODY.

    B.

    The doEndTag() method should return Tag.SKIP_PAGE.

    C.

    The doStartTag() method should return Tag.SKIP_BODY.

    D.

    The doStartTag() method should return Tag.SKIP_PAGE.

    Note

    -Option A is invalid because this is not a valid return value for doEndTag().

    -Option C is invalid because it only causes the body of the tag to be skipped.

    -Option D is invalid because this is not a valid return value for doStartTag().

  2. Which directives and/or standard actions are applicable ONLY within tag files? (Choose all that apply.)

    A.

    tag

    B.

    page

    C.

    jsp:body

    D.

    jsp:doBody

    E.

    taglib

    Note

    (JSP v2.0 8.5 (pg 1-179) ...

Get Head First Servlets and JSP, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.