From: Greg W. <gre...@us...> - 2005-11-19 09:04:59
|
User: gregwilkins Date: 05/11/19 01:04:53 Modified: src/org/mortbay/http ContextLoader.java HttpContext.java HttpServer.java Log: cleanup classloading Revision Changes Path 1.36 +6 -4 Jetty/src/org/mortbay/http/ContextLoader.java Index: ContextLoader.java =================================================================== RCS file: /cvsroot/jetty/Jetty/src/org/mortbay/http/ContextLoader.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -w -r1.35 -r1.36 --- ContextLoader.java 18 Nov 2005 17:54:05 -0000 1.35 +++ ContextLoader.java 19 Nov 2005 09:04:53 -0000 1.36 @@ -306,15 +306,17 @@ result=false; } - else if (c.endsWith(".")) + if (c.endsWith(".")) { if (name.startsWith(c)) return result; } else if (name.equals(c)) + { return result; } } + } return false; } @@ -338,7 +340,7 @@ result=false; } - else if (c.endsWith(".")) + if (c.endsWith(".")) { if (name.startsWith(c)) return result; 1.135 +11 -5 Jetty/src/org/mortbay/http/HttpContext.java Index: HttpContext.java =================================================================== RCS file: /cvsroot/jetty/Jetty/src/org/mortbay/http/HttpContext.java,v retrieving revision 1.134 retrieving revision 1.135 diff -u -w -r1.134 -r1.135 --- HttpContext.java 18 Nov 2005 17:54:05 -0000 1.134 +++ HttpContext.java 19 Nov 2005 09:04:53 -0000 1.135 @@ -114,8 +114,8 @@ private PermissionCollection _permissions; private boolean _classLoaderJava2Compliant=true; private ResourceCache _resources; - private String[] _systemClasses=new String [] {"java.","javax.servlet.","javax.xml.","org.mortbay.","org.xml.","org.w3c."}; - private String[] _serverClasses = new String[] {"org.mortbay.jetty.Server","org.mortbay.http.","org.mortbay.start.","org.mortbay.stop."}; + private String[] _systemClasses=new String [] {"java.","javax.servlet.","javax.xml.","org.mortbay.","org.xml.","org.w3c.","org.apache.commons.logging."}; + private String[] _serverClasses = new String[] {"-org.mortbay.http.PathMap","-org.mortbay.jetty.servlet.Invoker","-org.mortbay.jetty.servlet.JSR154Filter","-org.mortbay.jetty.servlet.Default","org.mortbay.jetty.Server","org.mortbay.http.","org.mortbay.start.","org.mortbay.stop."}; /* ------------------------------------------------------------ */ private String _contextName; @@ -209,6 +209,7 @@ { _httpServer=httpServer; _contextName=null; + } /* ------------------------------------------------------------ */ @@ -1628,6 +1629,11 @@ if (isStarted()) return; + if (_httpServer.getServerClasses()!=null) + _serverClasses=_httpServer.getServerClasses(); + if (_httpServer.getSystemClasses()!=null) + _systemClasses=_httpServer.getSystemClasses(); + _resources.start(); statsReset(); 1.69 +9 -11 Jetty/src/org/mortbay/http/HttpServer.java Index: HttpServer.java =================================================================== RCS file: /cvsroot/jetty/Jetty/src/org/mortbay/http/HttpServer.java,v retrieving revision 1.68 retrieving revision 1.69 diff -u -w -r1.68 -r1.69 --- HttpServer.java 18 Nov 2005 17:54:05 -0000 1.68 +++ HttpServer.java 19 Nov 2005 09:04:53 -0000 1.69 @@ -24,7 +24,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.EventListener; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -36,14 +35,10 @@ import org.mortbay.http.handler.DumpHandler; import org.mortbay.http.handler.NotFoundHandler; import org.mortbay.http.handler.ResourceHandler; -import org.mortbay.util.ComponentEvent; -import org.mortbay.util.ComponentListener; import org.mortbay.util.Container; import org.mortbay.util.EventProvider; import org.mortbay.util.InetAddrPort; -import org.mortbay.util.LazyList; import org.mortbay.util.LifeCycle; -import org.mortbay.util.LifeCycleListener; import org.mortbay.util.LogSupport; import org.mortbay.util.MultiException; import org.mortbay.util.Resource; @@ -117,6 +112,9 @@ private int _requestsPerGC ; private boolean _resolveRemoteHost =false; + private String[] _serverClasses; + private String[] _systemClasses; + private transient int _gcRequests; private transient HttpContext _notFoundContext=null; private transient boolean _gracefulStop; @@ -660,7 +658,7 @@ */ public void setSystemClasses(String[] classes) { - log.warn("setSystemClasses is deprecated on HttpServer"); + _systemClasses=classes; } /* ------------------------------------------------------------ */ @@ -669,7 +667,7 @@ */ public String[] getSystemClasses() { - return null; + return _systemClasses; } /* ------------------------------------------------------------ */ @@ -678,7 +676,7 @@ */ public void setServerClasses(String[] classes) { - log.warn("setServerClasses is deprecated on HttpServer"); + _serverClasses=classes; } /* ------------------------------------------------------------ */ @@ -687,7 +685,7 @@ */ public String[] getServerClasses() { - return null; + return _serverClasses; } |