wood burning stoves*
The moose likes Servlets and the fly likes Custom Tags in Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Custom Tags in Jsp" Watch "Custom Tags in Jsp" New topic

Custom Tags in Jsp

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hello every one out there.This post is regarding custom tags in Jsp. Could any one help me regarding the following
1) How to create a jar file which consists of a class file(Tag Handler) and the taglib.tld.(Note- After creating the jar, if we unjar we should get a Meta-Inf directory under which .tld file should be placed.This where i am facing problem. The taglib.tld file is present in the Meta-Inf directory.Instead it consists some .MF file)
2)Where,With Respect to JavaWebServer2.0, should i place the jar & class file.
Please answer the above questions
Thanx in Advance
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
I've never used custom tags myself, but I think they should be in the "WEB-INF" directory rather than "META-INF".

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
In "WEB-INF/tlds"

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
First of all Thanx for responding. My question was (first one) how to jar the .tld and the class file(tag handler).After .jar file is created when we use jar fx,we should be able to see a Meta-Inf directory under which u should be able to see the taglib.tld file.
I have use the following command
jar -cf mytags.jar taglib.tld HelloWorld.class
But when i unjared the mytags.jar the above said Meta-Inf directory doesn't contain taglib.tld but Manifest.mf file.
I have been asking this because it is given in a tutorial at www.orionserver.com/taglibtut.
So kindly correct me
And Tony has said to place the files in Web-inf directory.But i couldn't find any such directory in JWS2.0. I asked the question with respect to JWS2.0
[This message has been edited by clkanth (edited June 22, 2000).]
[This message has been edited by clkanth (edited June 22, 2000).]
[This message has been edited by clkanth (edited June 22, 2000).]
jQuery in Action, 2nd edition
subject: Custom Tags in Jsp
Similar Threads
Tag Files : why TLD requires
i think there's a bug on the manning book
tag file doubt (javabeat mock question)
how to work with jsp custom tags
Implicit mapping of TLDs