Where is Eclipse deploy web application – Tomcat

By default Eclipse deploys web application to a internal plugin folder called wtpwebapps, which is located in the following directory :


{Your_Workspace}/.metadata/.plugins/org.eclipse.wst.server.core/tmp{number}/wtpwebapps

#Example 1 - Windows
C:\Users\mkyong\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps

#Example 2 - Mac OSX
/Users/mkyong/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps

How it works

In Server view, double clicks on the “Tomcat Server”, the deployment work is defined in the Server Locations

eclipse-tomcat-deploy-web-application-1

To edit the default behaviors, clicks on the Open Launch Configuration, select Arguments tab, the deploy path is defined in the VM arguments :

eclipse-tomcat-deploy-web-application-2

VM arguments :


-Dcatalina.base="/Users/mkyong/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1" 
-Dcatalina.home="/Users/mkyong/Downloads/apache-tomcat-7.0.29" 
-Dwtp.deploy="/Users/mkyong/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps" 
-Djava.endorsed.dirs="/Users/mkyong/Downloads/apache-tomcat-7.0.29/endorsed"

14 comments on “Where is Eclipse deploy web application – Tomcat

  1. Hi I can see that tem0 is getting created when i launch an application but i have created a Users.dat file from the server using the statement
    File file = new File(“Users.dat”);

    now when i run my applicaiton 2nd time i can see that the dat file still existes in the server even though i have dleleted the server and tryed to run again the dat file is still present i am unable to locate that file to modify or delete it permanently.

    Please help me asap.

    Reply
    1. Check the “out” folder while configuring the server in IntelliJ. It corresponds to the wtpwebapps folder in eclipse.

      Reply
  2. Thanks for sharing these information. Your blogs have been very useful for me while working on unfamiliar technologies. Keep up the good work.

    Regards,

    Venkatesh

    Reply
  3. Great information. How does the working directory shown at the bottom of your second screenshot relate to the other arguments (base, home, deploy, endorsed)?

    Reply
  4. Mkyong your site is brilliant. I learning from you everyday a new thing. I wanted to ask of you if you could write a tutorial as to how to debug the Tomcat Source code in Eclipse. I have been trying this for long and haven’t made a break through. This would assist all of us to understand the internals of servlets and tomcat.

    Thanks in advance,
    Harry

    Reply
  5. Thanks Mkyong…!!! For my Web-Applications every time when i visited to “www.mkyong.com” I got new and useful information. Thanks again….

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *