Tomcat 4.1 doesn't have any "known to the container" mechanisms built in,
but there is a strategy you can use (also portable) to avoid having to
separately copy TLDs into your webapps.  You can put TLD files in the
"META-INF/tlds" directory of a JAR file in /WEB-INF/lib (presumably the
JAR containing your tag library implementation classes), and Tomcat will
automatically recognize it.  In fact, if your pages use the same URI that
you specify in the <uri> element in the TLD, you don't need to declare
them in the web.xml file either.

Now, using a tag library is simply a matter of dropping a JAR file into
/WEB-INF/lib.

Craig



On Thu, 3 Oct 2002, Tim Moore wrote:

> Date: Thu, 3 Oct 2002 18:11:16 -0400
> From: Tim Moore <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Shared JSP taglibs
>
> >From the JavaServer Pages 1.2 Specification:
>
> JSP.7.3.5 Implicit Map entries from the Container
> The container may also add additional entries to the taglib map. As in
> the previous
> case, the entries are only added for URIs that are not present in the
> map. Conceptually
> the entries correspond to TLD describing these tag libraries.
> These implicit map entries correspond to libraries that are known to the
> container, who is responsible for providing their implementation, either
> through
> tag handlers, or via the mechanism described in Section JSP.7.3.9.
>
> Does Tomcat 4.1.x support this in any way? If so, can I add my own
> taglibs to the map of known taglibs?  We have several webapps running on
> the same server that use the same tag libraries.  Currently, we have the
> tag handler classes in a shared JAR, and copy the TLD files into each
> webapp.  If I could avoid having to do the latter, that would be nice.
> :-) I haven't seen anything to indicate that it's possible, but if it
> is, that would be cool!
> --
> Tim Moore / Blackboard Inc. / Software Engineer
> 1899 L Street, NW / 5th Floor / Washington, DC 20036
> Phone 202-463-4860 ext. 258 / Fax 202-463-4863
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to