WebXmlNoTaglib

HomePage | RecentChanges | Preferences

There is a way you can deploy *none* of the tlds. :) Assuming you're on a Servlet 2.3 or better container, and that by "deploying" you mean you're putting the tlds "loose" under WEB-INF and configuring them in web.xml, all you have to do is start using the URI in your <@% taglib> tags, and the tlds which are already in (for example) struts.jar will be automatically used.

Example:

   <%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %> 

If you're using the non-el version of the tags, the URI will be different-- look in the tld itself for the <uri>http://struts.apache.org/tags-html</uri>;, and use that in your <%@ taglib> tag.


The above method works because the JavaServer Pages specification requires the container to search inside the .jar files and the filesystem for those tld files.

If you elect to configure your TLDs in web.xml, then to take full advantage you can tell Tomcat *not* to search for tlds with

processTlds="false"

See: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Standard%20Implementation


HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited October 27, 2005 4:22 pm by WendySmoak (diff)
Search: