You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Aaron Mulder <am...@alumni.princeton.edu> on 2001/05/19 22:58:57 UTC

Re: Does the beta Tomcat 4 support multiple TLD files in a jar?

On Sat, 19 May 2001, Jayson Falkner wrote:
> I assume it does. If so what is the correct way to use this functionality? I
> have been having little luck trying and can't find the answer documented.
>
> Here is a little insight on what I was attempting. The JAR has all of the
> class files in their correct directories along with a TLD in the META-INF
> directory named "exampleTags.tld".
>
> exampleTags.tld has the uri element set with the value "/exampleTags.tld".
>
> ...
> <taglib>
>   ...
>   <uri>/exampleTags.tld</uri>
> </taglib>

	Well, first it shouldn't be just plain "uri":

<taglib>
	<taglib-uri>/myPRlibrary</taglib-uri>
	<taglib-location>/WEB-INF/tlds/PRlibrary_1_4.tld</taglib-uri>
</taglib>

	And second, what are you using for the taglib-location?  That's
how it would locate the .tld file.  If you're not using one, perhaps you
need to prefix the URI with META-INF/ since all the TLDs are required to
be in the META-INF directory of the packaged JAR.

Aaron

> I am trying the following with a JSP.
> ---
> <%@ taglib prefix="e" uri="/exampleTags.tld" %>
> Here is the example tag output: <e:example />
> ---
> But a servlet exception error message keeps popping up.
>
> org.apache.jasper.JasperException: File "/exampleTags.tld" not found
> ...
>
>
> Anyone had this before? Advice would be appreciated.
>
> Jayson Falkner
> V.P./CTO, Amberjack Software LLC
> Jayson@jspinsider.com
> www.jspinsider.com
>
>


Re: Does the beta Tomcat 4 support multiple TLD files in a jar?

Posted by Jayson Falkner <ja...@jspinsider.com>.
> Well, first it shouldn't be just plain "uri":
>
> <taglib>
> <taglib-uri>/myPRlibrary</taglib-uri>
> <taglib-location>/WEB-INF/tlds/PRlibrary_1_4.tld</taglib-uri>
> </taglib>

Are you referring to an entry in the web.xml file?

I was asking about having multiple Tag Library Descriptors in a JAR.
According the the JSP 1.2 pfd anything in the META-INF directory with the
".tld" extension should get mapped accordingly by the "uri" attribute.

I was snagging  the uri element from the JSP 1.2 TLD DTD in the specs. The
idea was to deploy the entire set of tags through a JAR, not by editing
web.xml at all. As I understood this is possible. With JSP 1.1 you can do
the same but may only have one TLD file in the JAR.

Were you addressing this?

Jayson Falkner
V.P./CTO, Amberjack Software LLC
Jayson@jspinsider.com
www.jspinsider.com