jar = JarFactory.newInstance(url);
if (jar.entryExists("META-INF/resources/")) {
context.addResourceJarUrl(url);
}
} else if ("file".equals(url.getProtocol())) {
FileDirContext fileDirContext = new FileDirContext();
fileDirContext.setDocBase(new File(url.toURI()).getAbsolutePath());
try {
fileDirContext.lookup("META-INF/resources/");
//lookup succeeded
if(context instanceof StandardContext){
((StandardContext)context).addResourcesDirContext(fileDirContext);
}
} catch (NamingException e) {