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.

Prerequisites:

  • Eclipse IDE (Mars release)
  • Java 1.8

Step-1

Download and install Apache Tomcat 8 using this tutorial.

Step-2

Open eclipse, Window -> Show View -> Other -> Servers

Click “OK”.

Step-3

Inside Servers view, right click -> New -> Server -> Tomcat v8.0 Server

Click “Next”.

Step-4

In the next screen, browse the tomcat installation folder that you just installed in Step-1 and set the default JRE as the following:

Click ‘Finish’.

Step-5

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.

 Step-6

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

That’s it.

husseinterek

Founder of programmergate.com, I have a passion in software engineering and everything related to java environment.

You may also like...

Leave a Reply

1 Comment on "How to setup Tomcat in Eclipse"

avatar
newest oldest most voted
Sanath
Guest

how to drag and drop the application to Tomcat v8.5 Server under Servers view?
not able to do it