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"

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

14 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Chandhan Sai
7 years ago

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.

Carlos
8 years ago

Great post, thanks for share

Guest1
8 years ago

Thanks. It’s clear and useful.

Venkatesh
10 years ago

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

Gaedor
10 years ago

Thank you very useful!

flex
10 years ago

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

Harry
11 years ago

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

Arun Banik
11 years ago

Very useful indeed. Thank you very much.

mkyong
11 years ago
Reply to  Arun Banik

Welcome

isakoveve
11 years ago

ty

Manoj Sawant
11 years ago

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

mkyong
11 years ago
Reply to  Manoj Sawant

Welcome.

Guest2
7 years ago

is there a way for intellij?

Avijit
7 years ago
Reply to  Guest2

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