• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom tag in Jar  RSS feed

 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i place a custom tag classes and TLD in jar so that other projects can use this custom tag with out adding in there web.xml?

is there any way ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of JSP are you using ? With JSP2.x, your tag library descriptors (TLDs) must reside in the META-INF directory, or any sub-directories of it. Class files packages will be at the top of the archive.
 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Christophe, i was using JSP 2.0, so i have to place TLD in my META_INF.
Right?

So do i need any addition in web.xml ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so i have to place TLD in my META_INF.

META-INF, not META_INF ;)

So do i need any addition in web.xml ?

No, the container will find the TLDs and maps the uris automatically.
 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


thanks for your help.i got it



now i am using Eclipse where i have two project.one is customtagProj (which is a java project)another is the web testProject. i want to test that custom tag in testProject itself (without making that as a jar), may i know how can i do that?

because once you make your customtagProj as jar then it will be visible to your test proj, but if add customtagProj to the class path of test proj will test proj will it work?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!