hbthlw
7/24/2018 - 4:49 AM

[jetty contextPath] 配置jetty启动war包,并设置contextPath。文件放到webapps目录下。#jetty #java

[jetty contextPath] 配置jetty启动war包,并设置contextPath。文件放到webapps目录下。#jetty #java

<?xml version="1.0"  encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <!-- 访问路径 -->
    <Set name="contextPath">/</Set>
  <!-- war包路径,和xml文件一致 -->
    <Set name="war">/Users/apple/work/test-web.war</Set>
</Configure>