首页 > jetty 怎么监视 WEB-INF/web.xml ?

jetty 怎么监视 WEB-INF/web.xml ?

同样的项目用tomcat

可以在context用 WatchedResource 来监视WEB-INF/web.xml变动

<?xml version='1.0' encoding='utf-8'?>
<Context path="/szfm" docBase="d:/mobile/szfm" debug="0" reloadable="true" crossContext="true"  >
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>

但是参照jetty官网上的文档http://www.eclipse.org/jetty/documentation/current/configuring-virtual-hosts.html

<?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">/szfm/</Set>
  <Set name="war">d:/mobile/szfm</Set>
</Configure>

启动jetty服务器 根本不读取项目的WEB-INF/web.xml 修改WEB-INF/web.xml 也没有任何提示

【热门文章】
【热门文章】