'Undeploy Old Versions and remove packege Tomcat 7

I have set up a parallel deployment for tomcat 7 and I would like to know if it is possible to tell tomcat to delete the old version of the context after undeploy ? The last message I see is from Catalina - INFO: Undeploying context [##2]

server.xml :

<?xml version="1.0" encoding="UTF-8"?>

-<Server shutdown="SHUTDOWN" port="8005">

<Listener SSLEngine="off" className="org.apache.catalina.core.AprLifecycleListener"/>

<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>

<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>

<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>


-<Service name="Catalina">

<Connector port="8080" URIEncoding="UTF-8" redirectPort="8443" connectionTimeout="20000" server="Apache" protocol="HTTP/1.1"/>


-<Engine name="Catalina" defaultHost="localhost">

<Host name="localhost" undeployOldVersions="true" autoDeploy="true" appBase="/"> </Host>

</Engine>

</Service>

</Server>

/Catalina/localhost/ROOT##2.xml :

<Context reloadable="true" docBase="path/to/app/app##3" path="/"/>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source