This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Whizlabs is correct or HFJS ?????  RSS feed

 
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
 
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/.
 
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!