• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Tag files

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allright Christophe! Thanks for your help!
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic