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

Eclipse Server View

Click “OK”.

Step-3

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

Eclipse new 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:Eclipse Tomcat JRE

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:Eclipse Tomcat Port

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.

0 0 vote
Article Rating

Hussein Terek

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

You may also like...

guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Sanath
Sanath
2 years ago

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

Daniel
Daniel
2 years ago

How does the drag and drop work?