https://bz.apache.org/bugzilla/show_bug.cgi?id=57723
            Bug ID: 57723
           Summary: An incomplete fix for invalid context paths in
                    StandardContext.java / JNDI fails
           Product: Tomcat 7
           Version: 7.0.59
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: c...@vx4.de

The fix for #57216 is aimed handle invalid context paths, such as "/".
When using Tomcat.addWebapp() the (wrong) name for the context is
already set in Line 534.

    public Context addWebapp(Host host, String url, String path) {
        return addWebapp(host, url, url, path);
    }

    public Context addWebapp(Host host, String url, String name, String path) {
        silence(host, url);
        Context ctx = createContext(host, url);
        ctx.setName(name);
        ctx.setPath(url);
        ctx.setDocBase(path);
...

Therefore StandardContext.setPath()#2198 does not set the corrected name for
the
context.

This causes JNDI to fail, i.e. in JSPCompilationContext.getLastModified()#410
and
#421.

if(invalid) should also include setting the new corrected name.
Or fail hard - that would have made it easier to find.

Best regards,
Christian

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to