Project: Tomcat
Bug 42673 SSI virtual include broken for context path with slashes
Reported: 2007-06-15 05:08:34 | Status: resolved fixed

If the context path of an application contains slashes (e.g. "a/b") the method getPathWithoutContext of class org.apache.catalina.ssi.SSIServletExternalResolver simply cuts from the second slash, so for url "/a/b/do?.." it tries to include "b/do?.." instead of "do?..". The patch is to include the context path and strip the path off: Line 419 String noContext = getPathWithoutContext(normContext.getContextPath(), normalized); Line 356ff protected String getPathWithoutContext(final String contextPath, final String servletPath) { if (servletPath.startsWith(contextPath)) { return servletPath.substring(contextPath.length()); } return servletPath; }

Files changed in fix:
java/org/apache/catalina/ssi/SSIServletExternalResolver.java