关键字:使用Jetty
什么是Jetty:
http://www.matrix.org.cn/resource/article/2006-08-14/Jetty_44588.html
public static void main(String[] args) throws Exception {
Server server = new Server(8080); //也可以改成其它端口
File rootDir = new File(RunJetty.class.getResource("/").getPath()).getParentFile().getParentFile();
String webAppPath = new File(rootDir, "src/main/webapp").getPath();
new WebAppContext(server, webAppPath, "/");
server.start();
}
什么是Jetty:
http://www.matrix.org.cn/resource/article/2006-08-14/Jetty_44588.html