Which of the following values of tagdir attribute of the taglib directive is invalid? [Assume that the specified directories exist.] A. /WEB-INF/tags B. /META-INF/tags C. /WEB-INF/tags/shopping
Choice B is the correct answer.
It explains: The "tagdir" attribute is used to specify the directory where the tag extensions are installed. The valid values are /WEB-INF/tags/ directory or any of its subdirectory. If any other value is given, a compilation error will occur. Thus, Choices A and C are valid and hence incorrect.
but..................... According to Fig in HFJS in page 476 it can be in side /META-INF/tags tooooooooooo! So Whizlabs is correct or HFJS ???
If I understand right from HFJS all answer are valid so there is no right choice. Please explain?
Aaron Raja SCJP 1.4 SCWCD --> On the way (Shock and awe) OCA
The page 476 says "The places the container looks for TLDs" and in that one of it was to look under META-INF directory of a jar file place in WEB-INF/lib. It doesnot say anything abt tagdir attribute there.
And as christophe mentioned. It is clearly said in Jsp Spec.
tagdir Indicates this prefix is to be used to identify tag extensions installed in the /WEB-INF/tags/ directory or a subdirectory. An implicit tag library descriptor is used (see Section JSP.8.4 for details). A translation error must occur if the value does not start with /WEB-INF/tags/. A translation error must occur if the value does not point to a directory that exists. A translation error must occur if used in conjunction with the uri attribute.
Hope this helps!!
[ September 06, 2007: Message edited by: kalpana ram ] [ September 06, 2007: Message edited by: kalpana ram ]
Joined: Jun 07, 2007
Thanks Chris & Kalpana! Looks like I was "Lost in Translation" I am clear now! Thanks Aaron Raja SCJP 1.4 SCWCD --> On the way (Shock and awe) OCA [ September 09, 2007: Message edited by: Aaron Raja ]