Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whizlabs is correct or HFJS ?????

 
Aaron Raja
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whizlab quiz have following question-

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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have HFSJ so I can't confirm, but Whizlabs is correct. The tagdir attribute of the taglib directive must start with "WEB-INF/tags". Are you sure HF talks about the taglib directive there ?

Spec JSP.1.10.2 The taglib Directive :
A translation error must occur if the value does not start with /WEB-INF/tags/.
 
kalpana ram
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raja,

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!!

thanks
Kalpana.

[ September 06, 2007: Message edited by: kalpana ram ]
[ September 06, 2007: Message edited by: kalpana ram ]
 
Aaron Raja
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic