This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Whizlabs is correct or HFJS ????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Whizlabs is correct or HFJS ?????" Watch "Whizlabs is correct or HFJS ?????" New topic
Author

Whizlabs is correct or HFJS ?????

Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
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


Thanks, AR
SCWCD 5, SCJP 1.4, OCA (PL/SQL)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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/.


[My Blog]
All roads lead to JavaRanch
kalpana ram
Ranch Hand

Joined: May 20, 2007
Posts: 38
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

Joined: Jun 07, 2007
Posts: 206
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Whizlabs is correct or HFJS ?????