Created
July 19, 2013 20:34
-
-
Save marko-asplund/6042147 to your computer and use it in GitHub Desktop.
Using Jersey 2 Spring integration prototype with Jetty 9 embedded (with servlet 3.0 annotation support)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fi.markoa.proto.jersey2.jetty; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.webapp.Configuration; | |
| import org.eclipse.jetty.webapp.WebAppContext; | |
| public class JettyWebApp { | |
| public static void main(String ... args) throws Exception { | |
| Server server = new Server(8090); | |
| Configuration.ClassList classlist = Configuration.ClassList.setServerDefault(server); | |
| classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration", "org.eclipse.jetty.annotations.AnnotationConfiguration"); | |
| WebAppContext webapp = new WebAppContext(); | |
| webapp.setContextPath("/app1"); | |
| webapp.setWar("/foo/bar/jersey/examples/helloworld-spring/target/helloworld-spring.war"); | |
| server.setHandler(webapp); | |
| server.start(); | |
| server.join(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment