| Author |
Question on Tag files
|
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Guys, Is the TLD for a tag file and a custom tag are different? I mean in the TLD for a tag file, we only specify the location of the tag file but for the TLD of a custom tag, we provide other details as well. Is this correct? Another question is, Why do we need a TLD file when we jar? Any specific reasons?
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
Is the TLD for a tag file and a custom tag are different? I mean in the TLD for a tag file, we only specify the location of the tag file but for the TLD of a custom tag, we provide other details as well. Is this correct?
The TLD can be the same. Tag files are described with a "tag-file" tag, and other custom tags with a "tag" tag.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Thanks Christoph! And what about my other question...Why do we need a TLD for a tag file when we jar it?
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
I don't know. Maybe for compatibility reasons. Imagine that you import many third party JAR files, and one of them has a directory called "tags", which has nothing to do with tag files. The container has to know that it's not a tag file directory. So I guess that you have to explicitly tell the container which "tags" directory is a tag file. This does not happen if you put tag file straight under WEB-INF/tags, but the container already knows that this directory is used for tag files.
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Allright Christophe! Thanks for your help!
|
 |
khushhal yadav
Ranch Hand
Joined: Jun 20, 2007
Posts: 242
|
|
Hi Jothi Shankar It's because , by default the container looks only in the /WEB-INF/tags or its subdirectories for tag files until you don't specify explicitly in the web.xml. Hence if you don't create a tld for the tag files residing inside the /META-INF, container won't be able to locate it. And you will get an error. Regards, Khushhal
|
rgrds,
Khushhal
|
 |
 |
|
|
subject: Question on Tag files
|
|
|