File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question about Tag lib Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question about Tag lib" Watch "Question about Tag lib" New topic
Author

Question about Tag lib

Hendy Setyo Mulyo
Ranch Hand

Joined: Dec 01, 2004
Posts: 219

Hi ranchers,

This is taken from the mock exams:

Which of the following statements are correct regarding tag libraries?Select 1 correct option.
A.The tag library descriptor for a tag library must be kept in META-INF/taglib.tld, if the tag library is packaged in a jar file.
B.The tag library descriptor for a tag library may be kept in WEB-INF/taglib.tld, if the tag library is packaged in a jar file.
C.A JSP 2.0 compliant container is guaranteed to generate implicating mapping for JSTL tag libraries.
D.A JSP 2.0 compliant container will automatically generate an implicit tag library for a set of tag files.
E.The tag library descriptor for a tag library not packaged as a jar file may be kept anywhere in /tld directory of the web application'sdocument root
Answer: D

I know that D is correct, but I think A also correct. Maybe someone can brief me why only D is correct?

Thanks.


Hendy Setyo Mulyo
SCJP 1.4 (95%), SCWCD 1.4 (94%)
NDP Prasad
Ranch Hand

Joined: Apr 13, 2006
Posts: 177
The tag library descriptor for a tag library must be kept in META-INF/taglib.tld, if the tag library is packaged in a jar file.



I think it is not correct because if it is inside a jar it should be META-INF/jar/taglib.tld

Please correct me if iam wrong..


SCJP,SCWCD<br />
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

TLD can have any name whose extension is ".tld", and must put under META-INF (or subdirectory of it) when packaged in a JAR file. So it is not restricted to only one taglib.tld.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Please correct me if iam wrong..

Wrong Please refer to my post above.
Hendy Setyo Mulyo
Ranch Hand

Joined: Dec 01, 2004
Posts: 219

Originally posted by Satou kurinosuke:
TLD can have any name whose extension is ".tld", and must put under META-INF (or subdirectory of it) when packaged in a JAR file. So it is not restricted to only one taglib.tld.


I see. Thanks Satou
 
 
subject: Question about Tag lib
 
Similar Threads
A javabeat ques on tag library.
Location and name of tld
Which of the following statements are correct regarding tag libraries?
tag file doubt (javabeat mock question)
TLD files placement in JSP