EmbededJettywithJSP-成都快上网建站

EmbededJettywithJSP

Simple Jetty server with JSP supported.
  1.     public static void main(String[] args) throws Exception {
  2.         Server server = new Server(8082);

  3.         Configuration.ClassList classlist = Configuration.ClassList.setServerDefault(server);
  4.         classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration",
  5.                 "org.eclipse.jetty.annotations.AnnotationConfiguration" );

  6.         WebAppContext context = new WebAppContext("src/main/webapp", "/");
  7.         server.setHandler(context);
  8.         server.start();
  9.     }
pom.xml
  1.      
  2.           org.eclipse.jetty
  3.           apache-jsp
  4.           9.4.2.v20170220
  5.       
  6.       
  7.           org.eclipse.jetty
  8.           jetty-annotations
  9.           9.4.2.v20170220
  10.       



新闻标题:EmbededJettywithJSP
转载来源:http://kswjz.com/article/jhddos.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流