User: jules_gosnell Date: 02/02/16 06:15:26 Modified: jetty/src/main/org/jboss/jetty JBossWebApplicationContext.java Log: remove duplicates from Jasper classpath Revision Changes Path 1.22 +10 -5 contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java Index: JBossWebApplicationContext.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- JBossWebApplicationContext.java 16 Feb 2002 01:01:59 -0000 1.21 +++ JBossWebApplicationContext.java 16 Feb 2002 14:15:26 -0000 1.22 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: JBossWebApplicationContext.java,v 1.21 2002/02/16 01:01:59 jules_gosnell Exp $ +// $Id: JBossWebApplicationContext.java,v 1.22 2002/02/16 14:15:26 jules_gosnell Exp $ // A Jetty HttpServer with the interface expected by JBoss' // J2EEDeployer... @@ -167,7 +167,12 @@ { URL url=urls[i]; if (url.getProtocol().equals("file")) - classpath+=(classpath.length()==0?"":_separator)+url.getPath(); + { + String path=url.getPath(); + // brute force - but should strip out duplicates + if (classpath.indexOf(path)==-1) + classpath+=(classpath.length()==0?"":_separator)+path; + } else _log.warn("non-file URL encountered in ClassPath URLs"); } @@ -184,11 +189,11 @@ cl=cl.getParent()) { if (cl instanceof URLClassLoader) - classpath+=URLArrayToClassPath(((URLClassLoader)cl).getURLs(), classpath); + classpath=URLArrayToClassPath(((URLClassLoader)cl).getURLs(), classpath); else if (cl instanceof MBeanClassLoader) - classpath+=URLArrayToClassPath(((MBeanClassLoader)cl).getURLs(), classpath); + classpath=URLArrayToClassPath(((MBeanClassLoader)cl).getURLs(), classpath); else - _log.warn("unknown ClassLoader type ("+cl.getClass().getName()+") - jsp classpath may be incomplete"); + _log.warn("unknown ClassLoader type ("+cl.getClass().getName()+") - classpath may be incomplete"); }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development