I am having two .war files, say webapp-A.war and webapp-B.war of two different projects. When I start tomcat, it deploys these wars and two folders are created in webapps directory i.e. webapp-A and webapp-B.
When I start tomcat both these folders are scanned and loaded. This increases the startup time of tomcat and consumes more memory. I dont want to work on both at a time but I must be able to switch between any two.
So, is there any way to skip loading of webapp-B when I am working on webapp-A considering both being present in webapps directory?
When working with webapp-A, go to TOMCAT_HOME/conf/server.xml and update the host tag with attribute 'deployIgnore' as shown below
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true" deployIgnore="webapp-B">
....
</Host>
Start your tomcat server, webapp-B will not be deployed :)
This is my very first answer on stackoverflow btw, hope it helps, I signed up to help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With