public Resource getResource(String location) { if (wac != null && location.startsWith("/..")) { int slashpos = location.indexOf('/', 4); String uripath = location.substring(3, slashpos); // include leading / String relpath = location.substring(slashpos + 1); ServletContext extracontext = null; if (servletContextLocator != null) { extracontext = servletContextLocator.locateContext(uripath); } if (extracontext == null) { extracontext = wac.getServletContext().getContext(uripath); } if (extracontext == null) { return null; } else { return new ServletContextResource(extracontext, relpath); } } else return applicationContext.getResource(location); }