Image of How to setup Tomcat in Eclipse

ADVERTISEMENT

Table of Contents

Introduction

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.

Summary

In this tutorial, we provide a step-by-step guide on how to setup and configure Tomcat in Eclipse.

Next Steps

If you're interested in learning more about the basics of Java, coding, and software development, check out our Coding Essentials Guidebook for Developers, where we cover the essential languages, concepts, and tools that you'll need to become a professional developer.

Thanks and happy coding! We hope you enjoyed this article. If you have any questions or comments, feel free to reach out to jacob@initialcommit.io.

Final Notes