修改Jetty应用上下文方式
修改Jetty应用上下文路径方式:默认情况下,上下文路径与包名相同。
1,添加jetty-web.xml文件到项目里的WEB-INF下(web-jetty.xml也行)。
jetty-web.xml:
<?xml version="1.0"encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/aaa</Set>
</Configure>
2,通过在部署时指定上下文路径。详细请参考:http://jerval.iteye.com/blog/1871110
页:
[1]