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://lszwz.com/article/jhddos.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款