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://csruizhi.cn/article/jhddos.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 成都网站制作 成都网站设计公司 LED网站设计方案 成都网站设计 重庆企业网站建设 定制网站制作 成都网站建设公司 网站建设 手机网站制作 重庆电商网站建设 成都网站建设 网站制作 成都网站建设 营销型网站建设 成都营销网站制作 成都网站建设公司 品牌网站建设 成都网站建设流程 成都品牌网站设计 温江网站设计 成都响应式网站建设公司 成都网站建设