Coffee Cram: Final Exam Answers

  1. A programmer has a validly configured directory structure for his Java EE web application which is called MyWebApp. In which two directories could a file called myTag.tag reside in order to be accessed correctly by the container? (Choose two.)

    jsp 8, hf 608

    A.

    MyWebApp/WEB-INF

    B.

    MyWebApp/META-INF

    C.

    MyWebApp/WEB-INF/lib

    D.

    MyWebApp/WEB-INF/tags

    E.

    MyWebApp/WEB-INF/TLDs

    F.

    MyWebApp/WEB-INF/tags/myTags

    Note

    -Options D and F: tag files MUST be located in the tags directory or in a subdirectory of tags

  2. Which of the following are legal EL? (Choose all that apply)

    JSP v2.0 section 2.3.5, hf 396

    A.

    ${"1" + "2"}

    B.

    ${1 plus 2}

    C.

    ${1 eq 2}

    D.

    ${2 div 1}

    E.

    ${2 & 1}

    F.

    ${"head"+"first"}

    Note

    -Option A: ...

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.