i download here:

http://archive.apache.org/dist/tomcat/tomcat-7/

.50 and .52

i look into org.apache.tomcat.util.descriptor.DigesterFactory

those 2 files are for the piece that is wrong exactly the same for me:

    private static String idFor(String url) {
        URL id = ServletContext.class.getResource("resources/" + url);
        if (id == null) {
            id = ServletContext.class.getResource("jsp/resources/" + url);
        }
        return id.toExternalForm();
    }

both have that, but it should be:

    private static String idFor(String url) {
        URL id = ServletContext.class.getResource("resources/" + url);
        if (id == null) {
            id = JspContext.class.getResource("resources/" + url);
        }
        return id.toExternalForm();
    }


i need to patch this before it works for me (because we are running tomcat
also in a OSGI enviroment and then
jsp-api and servlet-api jars are not the same classloader

They are bundles of there own. So you can't load jsp related xml files
(from the jsp-api jar) through the ServletContext.class
the id == null for me

johan




On 27 February 2014 12:07, Mark Thomas <ma...@apache.org> wrote:

> On 27/02/2014 10:58, Johan Compagner wrote:
> > i just tested this under 7.0.52 that should have the fix (from 51 on
> > according to the change log)
> >
> > but its still this: (if i look into apache-tomcat-7.0.52-src.zip)
>
> Still what? The code you quote below is the code from 7.0.52 which is
> not the same as the code in 7.0.50. The 7.0.52 code is only looking at
> resources from the JAR that the ServletContext class is located in.
>
> >  private static String idFor(String url) {
> >         URL id = ServletContext.class.getResource("resources/" + url);
> >         if (id == null) {
> >             id = ServletContext.class.getResource("jsp/resources/" +
> url);
> >         }
> >         return id.toExternalForm();
> >     }
> >
> >
> > so it still fails for me.
>
> How does it fail? Are you sure you are using 7.0.52?
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
Johan Compagner
Servoy

Reply via email to