Coffee Cram: Chapter 8 Answers
Given an HTML form that uses checkboxes to allow a user to select multiple values for a parameter called
hobbies
.(JSP v2.0 sections 2.2.3)
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]}
Note
-Option B is incorrect because there is no “paramValue” implicit variable.
-Option D is incorrect, arrays are 0 indexed.
-Options E and F have incorrect syntax.
Given that a web application stores the webmaster email address in the servlet context initialization parameter called
master-email
.(JSP v2.0 sections 2.2.3 and 2.3.4)
Which retrieves that value? (Choose all that apply.)
A. ...
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.