问题描述
我正在阅读Damonar Chetty撰写的《 Tomcat 6开发人员指南》,在主持人一章中他说:
I'm reading "Tomcat 6 Developer's Guide" written by Damonar Chetty, and in the host chapter he says:
我将autoDeploy,deployOnStartup和unpackWARs设置为true,然后将战争放入APPBASE文件夹并调试部署过程,但是tomcat只是根据主机的启动事件部署战争。在autoDeploy的定期事件中没有部署发生。我认为这是因为第一次部署后没有任何改变,而Demonar Chetty所说的话是不对的。
So, I set autoDeploy, deployOnStartup and unpackWARs to true, then put a war into the APPBASE folder and debug the deploy process, but tomcat just deploys the war in reponse to the host's start event. No deployment occurs in the periodic event of autoDeploy. I think this is because nothing ever changed after the first deployment, and what Demonar Chetty says is not right.
您有什么看法?
推荐答案
是的。
如果在 server.xml
中添加Conext元素,并设置 autoDeploy = true
,tomcat将进行两次部署。
If you add Conext element in server.xml
, and set autoDeploy="true"
, tomcat will do deployment twice.
您只需设置 autoDeploy = false
或删除 server.xml
中的context元素。
you can just set autoDeploy="false"
or remove the context element in server.xml
.
这篇关于设置autoDeploy和deployOnStartup是否会导致应用在启动时被部署两次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!