tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Jiricka <petr.jiri...@netbeans.com>
Subject bug in TagLibs
Date Tue, 29 Feb 2000 10:16:24 GMT
Hi,

I don't know if this hasn't been discussed before. I found the following
problem:

If I change a taglib-location element in web.xml (I tried this for the
"examples" web app supplied with the build) to a relative URI according to
section 13.2 of the servlet 2.2 specification, so the <taglib> elements
looks like this:

    <taglib>
        <taglib-uri>
	   http://java.apache.org/tomcat/examples-taglib
        </taglib-uri>
        <taglib-location>
           jsp/example-taglib.tld
        </taglib-location>
    </taglib>

the engine will not find the tag library, because it is trying to resolve
the relative URI relatively to the current JSP page, not relatively to
web.xml.

After reading the specification, I got an impression that the correct
behavior is:

- if web.xml does not contain an entry corresponding to the "uri" attribute
of the <%@taglib%> directive, then the taglib location is this URI resolved
relavively to the current JSP page (as in section 2.5.2 of the JSP spec)

- if web.xml contains an entry corresponding to the "uri" attribute of the
<%@taglib%> directive, then the taglib location is the URI specified by the
<taglib-loaction> element, resolved relatively to web.xml (section 13.2 of
the servlet spec).

Please let me know if I am wrong.

Thanks
Petr

Mime
View raw message