• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploing Tags in Jars

 
luis meira
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,
I'm trying to deploy a test custom tag inside a jar.
unfortunately i'm having some problems, i'm geting an exception and i can't figure out why.
this is the exception i'm geting :
org.apache.jasper.JasperException: No such tag greet in the tag library imported with prefix buga
on my jsp i've put
<%@ taglib prefix="buga" uri="/mytag" %>
on the web.xml i've put
<taglib>
<taglib-uri>/mytag</taglib-uri>
<taglib-location>/web-inf/lib/mytags.jar</taglib-location>
</taglib>
my jar is located on web-inf/lib/mytags.jar
and has the following contents :
META-INF\taglig.tld
mytags\MyTag.class
what i'm doing wrong ? any ideas ?
best regards
Lu�s Meira
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you also show us your JSP where you call the custom tag and TLD for this tag? maybe names are different (just guess).
 
luis meira
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib prefix="buga" uri="/mytag" %>
<html>
<body>
<buga:greet server='<%="buga.mine.nu"%>' />
<form method="get" action="http://marte" >
<input type="button" value="Teste" />
</form>
<buga:greet server='<%="marte"%>' />
</body>
</html>

Originally posted by Mikalai Zaikin:
can you also show us your JSP where you call the custom tag and TLD for this tag? maybe names are different (just guess).
 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is taglig.tld included in the mytags.jar ?
 
k space
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you also show us your taglib.tld? It may just be typo inside the tld.
 
luis meira
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone
after an extremely a busy day i finaly figure it out
what was the problem i was having.
actualy the problem was very simple, i had deployed one day before to file system ( web-inf/classes )
and so tomcat was seeing the same tag on web-inf\classes and web-inf\lib.
i think the reason tomcat was saying he coudn't find
the classes was because i think web-inf\classes has precedence over web-inf\lib and so there he tries to find a tag definition file ( tld ) since he doesn't find it he gives the exception.
once i errased the classes from web-inf\classes every think works properly since i have the tld in meta-inf\taglib.tld.
thanks for for everything
best regards
Lu�s Filipe Meira
Originally posted by ks wong:
can you also show us your taglib.tld? It may just be typo inside the tld.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic