How to setup Tomcat in Eclipse
In this tutorial, we provide a step-by-step guide on how to setup and configure Tomcat in Eclipse.
- Eclipse IDE (Mars release)
- Java 1.8
Download and install Apache Tomcat 8 using this tutorial.
Open eclipse, Window -> Show View -> Other -> Servers
Inside Servers view, right click -> New -> Server -> Tomcat v8.0 Server
In the next screen, browse the tomcat installation folder that you just installed in Step-1 and set the default JRE as the following:
Now your server will be shown in the Servers view as the following:
In order to check the configuration of the server like (port number, log path … etc), double click on the server in Servers view:
You can modify these properties any time.
In order to deploy a web application under the new added server, just drag and drop the application to Tomcat v8.0 Server under Servers view.
In order to start Tomcat, right click Tomcat v8.0 Server -> Start
According to the above default configuration, tomcat will be up and accessible through: localhost:8085