|
1 | 1 | package warehouseServer;
|
2 | 2 |
|
3 | | -import java.io.File; |
4 | | -import java.io.IOException; |
5 | | -import java.net.URL; |
| 3 | +import java.io.File; import java.io.IOException; import java.net.URL; |
6 | 4 | import java.net.URLClassLoader;
|
7 | 5 |
|
8 | | -import org.apache.tomcat.InstanceManager; |
9 | | -import org.apache.tomcat.SimpleInstanceManager; |
| 6 | +import org.apache.tomcat.InstanceManager; import org.apache.tomcat.SimpleInstanceManager; |
10 | 7 | import org.eclipse.jetty.annotations.ServletContainerInitializersStarter;
|
11 | | -import org.eclipse.jetty.server.Server; |
12 | | -import org.eclipse.jetty.server.ServerConnector; |
| 8 | +import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; |
13 | 9 | import org.eclipse.jetty.webapp.WebAppContext;
|
14 | 10 |
|
15 | 11 | /**
|
@@ -47,17 +43,13 @@ public static void main(final String[] args) throws Exception {
|
47 | 43 | context.setAttribute(InstanceManager.class.getName(),
|
48 | 44 | new SimpleInstanceManager());
|
49 | 45 |
|
50 | | - context.addBean(// |
51 | | - new ServletContainerInitializersStarter(context), true); |
52 | | - context.setClassLoader( |
53 | | - new URLClassLoader(new URL[0], Main.class.getClassLoader())); |
| 46 | + context.addBean(new ServletContainerInitializersStarter(context), true); |
| 47 | + context.setClassLoader(new URLClassLoader(new URL[0], Main.class.getClassLoader())); |
54 | 48 |
|
55 | 49 | context.addServlet(WarehouseServlet.class, "/");//$NON-NLS-1$
|
56 | | - |
57 | 50 | server.setHandler(context);
|
58 | 51 |
|
59 | | - // start the server and wait for termination |
60 | | - server.start(); |
| 52 | + server.start(); // start the server and wait for termination |
61 | 53 | server.join();
|
62 | 54 | }
|
63 | 55 | }
|
|
0 commit comments