Setting autoDeploy and deployOnStartup will cause app be deployed twice on startup?
I'm reading "Tomcat 6 Develo开发者_高级运维per's Guide" written by Damonar Chetty, and in the host chapter he says:
Setting both to true will cause an application to be deployed at startup, and then again once Tomcat is up and running. As a result, ensure that you set at least one of these to false to avoid redundant deployment of the same web application.
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.
What's your opinion?
Yes it does.
If you add Conext element in server.xml
, and set autoDeploy="true"
, tomcat will do deployment twice.
you can just set autoDeploy="false"
or remove the context element in server.xml
.
精彩评论