How to configure Tomcat with Eclipse

  • 14 February 2017
  • ADM

 

How to configure Tomcat with Eclipse - images/logos/eclipse.jpg

 

For development, it is very useful to use Tomcat from Eclipse. Easy to start, easy to debug.

Step 1 - Download Tomcat.

From Tomcat web page, download the version needed. For version go with .zip version, for Linux/Mac with .tar.gz version. Unarchive to the destination folder. (Usually, I am using a single folder for all my development tools - D:\apps)

Step 2 - Configure Eclipse

Note: make sure you have the EE version of Eclipse.

Step 2.1

Switch to EE perspective (From menu Window --> Perspective --> Open perspective --> Other ... --> select Java EE).

Step 2.2

From views area, select Servers

How to configure Tomcat with Eclipse - /images/EclipseTomcat001.png

Step 2.3

Select the version of Tomcat downloaded and press Next >.

How to configure Tomcat with Eclipse - /images/EclipseTomcat002.png

Step 2.4

Select the tomcat folder location and click Finish.

How to configure Tomcat with Eclipse - /images/EclipseTomcat003.png

Now you should be able to add projects on the server.

How to configure Tomcat with Eclipse - /images/EclipseTomcat004.png

If you open the browser and open the http://localhost:8080 address you should see the tomcat default page.

How to configure Tomcat with Eclipse - /images/EclipseTomcat005.png

If the Tomcat server is not starting then double click on the server name and changed the Server Location to "Use Tomcat installation".

How to configure Tomcat with Eclipse - /images/EclipseTomcat006.png

 

References