"Holmes III, William S" wrote:
>
> Hi,
>
> Can someone point me to a working tag library example?
>
> I keep getting the following exception in Tomcat:
>
> org.apache.jasper.JasperException: Unable to open taglibrary taglib.jar : no
> protocol: taglib.jar
>         at
> org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
> ntListener.java:672)
>         at
> org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
> ener.java:116)
>                  :
>
> The jar file (WEB-INF/lib/taglib.jar) contains:
>   taglib/customtag.class
>   META-INF/taglib.tld
>
> The jsp file has the following:
>  <%@ taglib uri="taglib.jar" prefix="simple" %>
>     :
>     :
> <simple:hello/>
>     :
>     :
>

I'm pretty sure that Tomcat 3.1 doesn't support that the "uri" attribute
is the path to the JAR file. Try extracting the TLD from the JAR and
set the "uri" attribute to point to the TLD directly instead.

The spec was/is unclear about how to deal with references to a taglib JAR file,
but it's likely that it will be clarified to state that what you do should work.
But it will take some time before all containers implement this behavior.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to