File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tag files inside a JAR. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tag files inside a JAR. " Watch "Tag files inside a JAR. " New topic

Tag files inside a JAR.

Yeray Santana Borges
Ranch Hand

Joined: Mar 02, 2008
Posts: 46

If i have a tag file, header.tag that is in a JAR library I need this structure in my JAR library:

| ------------ tags/header.tag
|------------- mytld.tld

this is my mytld.tld

For use the header tag in another Web app, i need to put mylibrary.jar under /META-INF/lib directory and in my JSPs of my web app I can use the header.tag with this directive:

If my tag not is in a .jar library file. I need to put my header.tag file inside a directory/subdirectory WEB-INF/tags and I use the tag inside a JSP with this directive:

It is correct??


Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
absolutely correct :-)

JDBCSupport - An easy to use, light-weight JDBC framework -
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688


I think it should be tagdir="/WEB-INF/tags" instead.

[My Blog]
All roads lead to JavaRanch
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
True, I overlooked that part. You define all tags inside a directory by pointing at the directory itself. So all tag files will be accessible.
I agree. Here's the link:
subject: Tag files inside a JAR.
It's not a secret anymore!