aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ Edition 2  Final mock exam QNo:49 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ Edition 2  Final mock exam QNo:49" Watch "HFSJ Edition 2  Final mock exam QNo:49" New topic
Author

HFSJ Edition 2 Final mock exam QNo:49

Niteen Patil
Ranch Hand

Joined: Oct 27, 2009
Posts: 45
Given:
1. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/
jstl/core" %>
2. <%@ taglib prefix="tables" uri="http://www.javaranch.
com/tables" %>
3. <%@ taglib prefix="jsp" tagdir="/WEB-INF/tags" %>
4. <%@ taglib uri="UtilityFunctions" prefix="util" %>
What about the above taglib directives would cause the JSP to not function?
A. Line 4 is wrong because the prefix attribute must come before the
uri attribute.
B. Line 3 is wrong because there is no uri attribute.
C. Line 4 is wrong because the uri value must begin with http://
D. Line 3 is wrong because the prefix jsp is reserved for standard actions.

Answer given is : C.

The value in the uri attribute used in the tag must match with the value of the <uri> tag in TLD.
We can specify any value for uri such as: UtilityFunctions or a uri starting with http:// or ftp:// it doesn't matter.
So how come the option C is a valid answer.
Please clarify my doubt.
Thanks in advance.






Kapil Mishra
Greenhorn

Joined: Oct 04, 2009
Posts: 25
check errata for this book-

http://oreilly.com/catalog/errata.csp?isbn=9780596516680


SCJP 5,SCWCD 5
avi sinha
Ranch Hand

Joined: Mar 15, 2009
Posts: 452

jsp is a reserved word . so i think answer should be D.

also of the three attributes id,uri and tagDir

id is mandatory
either of uri or tagDir is mandatory (i.e. of the two , one must be there)


avi sinha


SCJP 5.0 SCWCD 5.0
Niteen Patil
Ranch Hand

Joined: Oct 27, 2009
Posts: 45
I too think that option D is the correct answer.
Thanks for the reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ Edition 2 Final mock exam QNo:49