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 9 Answers

  1. Which is true about TLD files?

    (JSP v2.0 pgs 3-16, 1-160)

    A.

    TLD files may be placed in any subdirectory of WEB-INF.

    B.

    TLD files are used to configure JSP environment attributes, such as scripting-invalid.

    C.

    TLD files may be placed in the META-INF directory of the WAR file.

    D.

    TLD files can declare both Simple and Classic tags, but TLD files are NOT used to declare Tag Files.

    Note

    -Option B is invalid because TLD files configure tag handlers not the JSP environment.

    -Option C is invalid because TLD files are not recognized in the META-INF of the WAR file.

    -Option D is invalid because Tag Files may be declared in a TLD (but it is rare).

  2. Assuming the standard JSTL prefix conventions are used, which JSTL tags would you use to iterate over a collection of objects? (Choose all that apply.)

    (JSTL v1.1 pg. 42)

    A.

    <x:forEach>

    B.

    <c:iterate>

    C.

    <c:forEach>

    D.

    <logic:iterate>

    E.

    <logic:forEach> ...

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