tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Jiricka <petr.jiri...@netbeans.com>
Subject RE: bug in TagLibs
Date Wed, 01 Mar 2000 09:37:01 GMT
> 
> The bug if that interpretation is correct is that we always 
> treat the resolved
> TLD path relative to the current JSP page.
> 
> Let me confirm this before fixing it.

I think the fix could be to replace 

String JspCompilationContext.resolveRelativeUri(String uri)

by 

String JspCompilationContext.getCurrentUri()
String JspCompilationContext.resolveRelativeUri(String uri, String
relativeTo)

or something like that. What do you think ?

> 
> In the meantime can you please file a bug in 
> jakarta.apache.org/bugs? This
> helps make sure it doesn't get lost and gets tracked.

Done (#41).

Petr

> 
> Thanks.
> 
> Petr Jiricka wrote:
> 
> > 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
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> --
> Peace, Anil +<:-)
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 

Mime
View raw message