Over a million developers have joined DZone.
Platinum Partner

How to Change the Default Webapp Deployment Location of Tomcat in Eclipse

· Java Zone

The Java Zone is brought to you in partnership with AppDynamics. Discover how AppDynamics steps in to upgrade your performance game and prevent your enterprise from these top 10 Java performance problems.

 When you deploy your Java web application to the Apache Tomcat server, via Eclipse, by default the web app will be deployed under {YOUR_ECLIPSE_WORKSPACE}\.metadata\.plugins\org.eclipse.wst.server.core\tmp{a-number}\wtpwebapps.

Suppose if you want to deploy your web app to a location that is easily navigable, follow these steps.

  1. First make sure you have removed all the web apps that are currently added to your server instance (In servers view, right click on the server name and then Add and Remove).
  2. And then double click on the server instance in servers view which will open up that server’s configuration page.
  3. On that page, see under Server Locations and select either the option Use Tomcat Installation to deploy the web app under the directory where the Tomcat server is installed or Use custom location to manually specify.
  4. Save, Re-add the web application and then Publish.
Tomcat server configuration in Eclipse

Now the deployed web app will be under the directory of your choice.

The Java Zone is brought to you in partnership with AppDynamics. AppDynamics helps you gain the fundamentals behind application performance, and implement best practices so you can proactively analyze and act on performance problems as they arise, and more specifically with your Java applications. Start a Free Trial.

Topics:

Published at DZone with permission of Veera Sundar , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}