ServletContext context = servlet.getServletContext();
String servletName = servlet.getServletName();
String expectedName = servletName + ".application";
Resource webInfLocation = new ContextResource(context, "/WEB-INF/");
Resource webInfAppLocation = webInfLocation.getRelativeResource(servletName + "/");
Resource result = check(webInfAppLocation, expectedName);
if (result != null)
return result;