How to change server location and deploy path for Tomcat in Eclipse
- Details
- Written by Nam Ha Minh
- Last Updated on 05 August 2019   |   Print Email
e:\Java\JavaEE\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
What if you want to deploy your Java web applications in another directory: Tomcat installation directory or your own directory? But you see all the options for Server Locations are grayed out, right? So how to make change?Here you will see how.Read the instruction carefully:Server must be published with no modules present to make changes.
This sounds logical because you can’t change server location and deploy path if there are still applications deployed on the default path. That means if you want to change server location you have to delete all the currently deployed applications on the server. To remove a deployed application from the server, simple select it in the server view and press Delete key. The server must be empty like this:And when there’s no more application, you see all the options for Server Locations are enabled:Other Tomcat Tutorials:
- How to deploy a Java web application on Tomcat
- How to Embed Tomcat Server into Java Web Applications
- How to Use Virtual Hosts in Tomcat
- How to set web application context path as server root in Tomcat
- How to configure JNDI DataSource for Database Connection Pooling in Tomcat
- How to configure session timeout in Tomcat
- How to change Tomcat port number
- How to add Tomcat server in Eclipse
Comments
Note that "Server must be published with no modules present to make changes." - meaning that you can only change deployment path if no webapps are added to the server.