title: How to remove previous projects from work folder in tomcat 7
body: <p>I have deployed some projects in <code>tomcat7</code> and removed them from <code>webapps</code> as well as from <code>work</code> folder but when try to deploy some new project as a <code>war</code> <code>to webapps</code> it is not getting extracted and all the previous projects folder were existing in work folder which are costing some problem.</p>
  
  <p>so please advise me how to completely remove older projects from tomcat7?</p>
  
  <p>log file which refers to folder which does not even exist</p>
  
  <pre><code>   SEVERE: Error starting static Resources
      java.lang.IllegalArgumentException: Document base D:\netbeans_workspace\Servlets-DWR\build\web does not exist or is not a readable directory
  
  
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext resourcesStart
  SEVERE: Error starting static Resources
  java.lang.IllegalArgumentException: Document base D:\netbeans_workspace\Servlets-DWR\build\web does not exist or is not a readable directory
          at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
          at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
          at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error in resourceStart()
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error getConfigured
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Context [/Servlets-DWR] startup failed due to previous errors
  Jul 13, 2012 2:38:07 PM org.apache.catalina.deploy.NamingResources cleanUp
  WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost
  [localhost].StandardContext[/Servlets-DWR]] so no cleanup was performed for that container
  javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
  mp].
          at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
          at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
          at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:977)
          at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:959)
          at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
          at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5483)
          at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
          at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDescriptor
  INFO: Deploying configuration descriptor D:\Servers\apache-tomcat-7.0.27\conf\Catalina\localhost\Sli
  ngeLeaveNotifier.xml
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext resourcesStart
  SEVERE: Error starting static Resources
  java.lang.IllegalArgumentException: Document base D:\netbeans_workspace\SlingeLeaveNotifier\build\we
  b does not exist or is not a readable directory
          at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
          at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
          at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error in resourceStart()
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error getConfigured
  Jul 13, 2012 2:38:07 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Context [/SlingeLeaveNotifier] startup failed due to previous errors
  Jul 13, 2012 2:38:07 PM org.apache.catalina.deploy.NamingResources cleanUp
  WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost
  [localhost].StandardContext[/SlingeLeaveNotifier]] so no cleanup was performed for that container
  javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
  mp].
          at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
          at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
          at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:977)
          at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:959)
          at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
          at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5483)
          at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
          at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\docs
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\examples
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\host-manager
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\manager
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory D:\Servers\apache-tomcat-7.0.27\webapps\ROOT
  Jul 13, 2012 2:38:07 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-apr-8080"]
  Jul 13, 2012 2:38:07 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-apr-8009"]
  Jul 13, 2012 2:38:07 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 4251 ms
  </code></pre>
  
  <p>Regards</p>