import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.server.ssl.SslSocketConnector;
-import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.Scanner;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.webapp.WebAppContext;
webappcontext.stop();
server.stop();
webappcontext.start();
- disableAtmosphereAnnotationScan(webappcontext);
server.start();
}
});
// Read web.xml to find all configured servlets
webappcontext.start();
- disableAtmosphereAnnotationScan(webappcontext);
-
try {
server.start();
return "http://localhost:" + port + serverArgs.get("context");
}
- private static void disableAtmosphereAnnotationScan(
- WebAppContext webappcontext) {
- // Reconfigure all servlets to avoid startup delay
- for (ServletHolder servletHolder : webappcontext.getServletHandler()
- .getServlets()) {
- if (servletHolder
- .getInitParameter("org.atmosphere.cpr.scanClassPath") == null) {
- servletHolder.setInitParameter(
- "org.atmosphere.cpr.scanClassPath", "false");
- }
- }
- }
-
/**
* Assign default value for given key.
*