• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question about tld

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

In HFS there is a question about tld files:
Which is true about TLD files?
(A) TLD files may be placed in any subdirectory of WEB-INF.
(B) TLD files are used to configure JSP environment attributes, such as scripting-invalid.
(C) TLD files may be placed in the META-INF directory of WAR file.
(D) TLD files can declare both Simple and Classic tags, but TLD files are NOT used to declare Tag Files.

Correct answer is: A.

But as I know it cant be placed in to WEB-INF/classes directory or it states that ok it can be placed but won't work?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TLD files should not be placed in /WEB-INF/classes or /WEB-INF/lib. It's not "must not", it's "should not", but I agree with you. I would not have answered A either. I would have rephrased it like :
(A) TLD files may be placed in any subdirectory of WEB-INF, except the "classes" and "lib" subdirectories.
 
Kiril Nugmanov
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Christophe.

Will contnue my jorney to the SCWCD5
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TLD Files can be placed in the following locations.
a) Directly within WEB_INF.
b) Under any subdirectory within WEB-INF. WEB-INF/*
c) Under META-INF inside a JAR file which is placed under WEB-INF/lib.
So for example if i have a jar file tags.jar then it must be placed under
WEB-INF/lib and therefore the tld can be placed under
WEB-INF/lib/tags.jar/META-INF
c) Under any subdirectory under META-INF inside a JAR file which is placed under WEB-INF/lib.
WEB-INF/lib/tags.jar/META-INF/*
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

b) Under any subdirectory within WEB-INF. WEB-INF/*


Please check JSP.7.3.1 Identifying Tag Library Descriptors.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Christophe Verre:

Please check JSP.7.3.1 Identifying Tag Library Descriptors.



yes, i read it Christophe. but, i check that just placing the tld in /WEB-INF/lib/.tld file ...it is working well. what do you say about this ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i check that just placing the tld in /WEB-INF/lib/.tld file ...it is working well.


The spec says that you should not place them there. It means that it may work, and the container you are using is fine with that. But it's not guaranteed for all containers. Otherwise the spec would not mention it at all.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Christophe Verre:
But it's not guaranteed for all containers. Otherwise the spec would not mention it at all.



yes,got it.Thanks Christophe
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic