lsxs-wy

  在网站开发过程中,有一个很烦的问题就是每次我们在项目里增加几行代码,然后我们企图在浏览器中查看修改后的变化时,却发现浏览器的内容并不变化,于是我们只能通过频繁的重启tomcat来获得最新的效果,其实这么做完全没必要,我们只需要修改下tomcat目录下conf文件夹中的context.xml中增加reloadable="true"就可以获得重启的效果。

  具体修改的配置如下:

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2.   
  3. <!-- The contents of this file will be loaded for each web application -->  
  4.   
  5. <!-- 在此处添加reloadable="true"即可 -->  
  6. -<Context reloadable="true">  
  7. <!-- Default set of monitored resources -->  
  8.  <WatchedResource>WEB-INF/web.xml</WatchedResource>  
  9. <!-- Uncomment this to disable session persistence across Tomcat restarts -->  
  10.    
  11. <!-- <Manager pathname="" /> -->  
  12.    
  13. <!-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) -->  
  14.    
  15. <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> -->  
  16.  </Context>

分类:

技术点:

相关文章:

  • 2021-09-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
猜你喜欢
  • 2021-11-21
  • 2021-06-27
  • 2021-08-16
  • 2021-07-01
  • 2022-02-20
  • 2022-12-23
相关资源
相似解决方案