Forums Register Login

question about tld

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Thanks Christophe.

Will contnue my jorney to the SCWCD5
+Pie Number of slices to send: Send
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/*
+Pie Number of slices to send: Send
 

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


Please check JSP.7.3.1 Identifying Tag Library Descriptors.
+Pie Number of slices to send: Send
 

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 ?
+Pie Number of slices to send: Send
 

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.
+Pie Number of slices to send: Send
 

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
If you're gonna buy things, buy this thing and I get a fat kickback:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1439 times.
Similar Threads
Regarding TLD Location
problem while using tagdir
Mock Exam Doubts
TLD file
HFSJ page 481 question 1
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:24:49.