remm 2003/06/12 15:06:30 Modified: catalina/src/share/org/apache/catalina/core ApplicationContext.java Log: - Use regular file URLs with everything from /WEB-INF/lib. - I'm not sure this is useful, and will be reverted to rev 1.12 otherwise. Revision Changes Path 1.13 +32 -15 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Index: ApplicationContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ApplicationContext.java 21 May 2003 17:49:03 -0000 1.12 +++ ApplicationContext.java 12 Jun 2003 22:06:30 -0000 1.13 @@ -526,19 +526,36 @@ if (path == null) return (null); - DirContext resources = context.getResources(); - if (resources != null) { - String fullPath = context.getName() + path; - String hostName = context.getParent().getName(); - try { - resources.lookup(path); - return new URL - ("jndi", null, 0, getJNDIUri(hostName, fullPath), - new DirContextURLStreamHandler(resources)); - } catch (Exception e) { - //e.printStackTrace(); + String libPath = "/WEB-INF/lib/"; + if ((path.startsWith(libPath)) && (path.endsWith(".jar"))) { + File jarFile = null; + if (context.isFilesystemBased()) { + jarFile = new File(basePath, path); + } else { + jarFile = new File(context.getWorkDir(), path); + } + if (jarFile.exists()) { + return jarFile.toURL(); + } else { + return null; + } + } else { + + DirContext resources = context.getResources(); + if (resources != null) { + String fullPath = context.getName() + path; + String hostName = context.getParent().getName(); + try { + resources.lookup(path); + return new URL + ("jndi", null, 0, getJNDIUri(hostName, fullPath), + new DirContextURLStreamHandler(resources)); + } catch (Exception e) { + // Ignore + } } } + return (null); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]