more JMX fixes
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@178 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
2bd6ef266b
commit
c555b7a0bf
|
@ -62,7 +62,7 @@ public class WebAppDeployer extends AbstractLifeCycle
|
|||
_configurationClasses=configurationClasses;
|
||||
}
|
||||
|
||||
public HandlerContainer getContexts()
|
||||
public HandlerCollection getContexts()
|
||||
{
|
||||
return _contexts;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
|
||||
package org.eclipse.jetty.handler.jmx;
|
||||
package org.eclipse.jetty.server.handler.jmx;
|
||||
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
package org.eclipse.jetty.webapp.jmx;
|
||||
|
||||
import org.eclipse.jetty.handler.jmx.ContextHandlerMBean;
|
||||
import org.eclipse.jetty.server.handler.jmx.ContextHandlerMBean;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
|
||||
public class WebAppContextMBean extends ContextHandlerMBean
|
||||
|
|
|
@ -8,8 +8,10 @@ import org.eclipse.jetty.http.security.Password;
|
|||
import org.eclipse.jetty.jmx.MBeanContainer;
|
||||
import org.eclipse.jetty.security.HashLoginService;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.handler.ContextHandler;
|
||||
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
||||
import org.eclipse.jetty.server.nio.SelectChannelConnector;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
|
||||
public class DemoServer
|
||||
|
@ -42,11 +44,16 @@ public class DemoServer
|
|||
login.putUser("admin",new Password("password"),new String[]{"user","admin"});
|
||||
server.addBean(login);
|
||||
|
||||
// ContextHandlerCollection
|
||||
ContextHandlerCollection contexts = new ContextHandlerCollection();
|
||||
server.setHandler(contexts);
|
||||
|
||||
// setup webapp
|
||||
WebAppContext context = new WebAppContext();
|
||||
context.setWar(args[0]);
|
||||
context.setDefaultsDescriptor("../jetty-webapp/src/main/config/etc/webdefault.xml");
|
||||
server.setHandler(context);
|
||||
contexts.addHandler(context);
|
||||
|
||||
|
||||
// start the server
|
||||
server.start();
|
||||
|
|
Loading…
Reference in New Issue