Skip to content

Instantly share code, notes, and snippets.

@jcheype
Created June 18, 2013 11:38
Show Gist options
  • Select an option

  • Save jcheype/5804679 to your computer and use it in GitHub Desktop.

Select an option

Save jcheype/5804679 to your computer and use it in GitHub Desktop.
simple main
package com.vidal.bo.test.webapp;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
/**
* Created with IntelliJ IDEA.
* User: jcheype
* Date: 18/06/13
* Time: 13:24
* To change this template use File | Settings | File Templates.
*/
public class Main {
public static void main(String args[]) throws Exception {
WebAppContext webAppContext = new WebAppContext();
webAppContext.setDescriptor(webAppContext + "/WEB-INF/web.xml");
webAppContext.setResourceBase("./src/main/webapp");
webAppContext.setContextPath("/posopoc");
Server server = new Server(8080);
server.setHandler(webAppContext);
server.start();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment