Coffee Cram: Mock Exam Chapter 8

  1. Given an HTML form that uses checkboxes to allow a user to select multiple values for a parameter called hobbies.

    Which EL expressions evaluate to the first value of the hobbies parameter? (Choose all that apply.)

    A.

    ${param.hobbies}

    B.

    ${paramValue.hobbies}

    C.

    ${paramValues.hobbies[0]}

    D.

    ${paramValues.hobbies[1]}

    E.

    ${paramValues[hobbies][0]}

    F.

    ${paramValues[hobbies][1]}

  2. Given that a web application stores the webmaster email address in the servlet context initialization parameter called master-email.

    Which retrieves that value? (Choose all that apply.)

    A.

    <a href='mailto:${initParam.master-email}'>
        email me</a>

    B.

    <a href='mailto:${contextParam.master-email}'>
        email me</a>

    C.

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.