jetty的context中怎么配置监视web.xml
1个回答
2016-12-21 · 知道合伙人软件行家
关注
展开全部
同样的项目目录 在tomcat中运行正常,但是用jetty url就匹配不到 http://www.xx.com/myapp/test.html后缀的页面
tomcat的配置文件
conf/Catalina/localhost/myapp.xml
?
1
2
3
4
<?xml version='1.0' encoding='utf-8'?>
<Context path="/myapp" docBase="d:/jetty/jetty-distribution-9.2.17.v20160517/myapp" debug="0" reloadable="true" crossContext="true" >
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
参照 http://www.eclipse.org/jetty/documentation/current/configuring-virtual-hosts.html 这上面的写了一个context
?
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/myapp</Set>
<Set name="war"><Property name="jetty.webapps"/>d:/jetty/jetty-distribution-9.2.17.v20160517/myapp</Set>
</Configure>
tomcat的配置文件
conf/Catalina/localhost/myapp.xml
?
1
2
3
4
<?xml version='1.0' encoding='utf-8'?>
<Context path="/myapp" docBase="d:/jetty/jetty-distribution-9.2.17.v20160517/myapp" debug="0" reloadable="true" crossContext="true" >
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
参照 http://www.eclipse.org/jetty/documentation/current/configuring-virtual-hosts.html 这上面的写了一个context
?
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/myapp</Set>
<Set name="war"><Property name="jetty.webapps"/>d:/jetty/jetty-distribution-9.2.17.v20160517/myapp</Set>
</Configure>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询