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"

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

avatar
11 Comment threads
2 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
12 Comment authors
Chandhan SaiGuest2CarlosGuest1Venkatesh Recent comment authors
newest oldest most voted
Chandhan Sai
Guest
Chandhan Sai

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.

Guest2
Guest
Guest2

is there a way for intellij?

Carlos
Guest
Carlos

Great post, thanks for share

Guest1
Guest
Guest1

Thanks. It’s clear and useful.

Venkatesh
Guest
Venkatesh

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
Guest
Gaedor

Thank you very useful!

flex
Guest
flex

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
Guest
Harry

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
Guest
Arun Banik

Very useful indeed. Thank you very much.

mkyong
Guest
mkyong

Welcome

isakoveve
Guest
isakoveve

ty

Manoj Sawant
Guest
Manoj Sawant

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

mkyong
Guest
mkyong

Welcome.