Coffee Cram: Chapter 9 Answers
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).
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> ...
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.