wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question on Tag files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question on Tag files" Watch "Question on Tag files" New topic
Author

Question on Tag files

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9427
    
    2

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, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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: 9427
    
    2

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: 14688
    
  16

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: 9427
    
    2

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Tag files