On 6/15/06, Tim Lucia <[EMAIL PROTECTED]> wrote:
xyzzy.jsp:
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
web.xml:
<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
Then place the actual tld file where the <taglib-location> element says it
should be.
This is not necessary if you're using a Servlet 2.3 or later container
-- Tomcat 4 or 5, for example. Most TLDs (including Struts) have a
URI (which, even though it may *look* like a URL, is not.) For
example:
<taglib>
<tlib-version>1.3</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>bean</short-name>
<uri>http://struts.apache.org/tags-bean</uri>
...
Try that uri in a browser -- it doesn't exist. Where it does exist is
in the struts-bean.tld file, inside struts.jar (or struts-taglib.jar
in 1.3).
Modern containers will discover tag library descriptors stored in jar
files, and you need only use the same uri in your taglib directive:
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
No need to keep "loose" copies of the tlds in WEB-INF, which means one
less thing to deal with for deployment and upgrades.
Or, as Craig says... "It's magic. :-)"
* http://marc.theaimsgroup.com/?l=struts-user&m=104205482618830&w=2
HTH,
--
Wendy
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]