How to configure Apache Tomcat in Eclipse IDE?

Apache Tomcat (or simply Tomcat) is an open source web server and Servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications. This can be managed manually or configured in any IDE.

This tutorial provides step by step explanation of how to configure Apache Tomcat in Eclipse IDE.

Environment Used

  • JDK 6 (Java SE 6)
  • Eclipse Indigo IDE for Java EE Developers (3.7.1)
  • Apache Tomcat 6.x
  • Windows OS/Ubuntu OS

Installing JDK

JDK should be installed with proper environment set up. Read this page for installing the JDK and setting up the environment. Installing JDK automatically installs JRE.

Installing Eclipse IDE

We use Eclipse IDE throughout this tutorial. If you need to install Eclipse, you can read this page.

Installing Apache Tomcat

Tomcat should be installed before configuring it in Eclipse IDE. If you need to install Apache Tomcat, you can read this page.

Configuring Apache Tomcat in Eclipse IDE

The step for configuring Apache Tomcat in Eclipse IDE is similar for Windows and Ubuntu OS.

Open Eclipse IDE

Add Server

Make sure you are in Java EE perspective and in “Servers” area, right click -> New -> Server.

Here you will see list of servers that can be configured in the installed Eclipse IDE version. You will find Tomcat v6.0 Server under “Apache” folder as shown below.

Select “Tomcat v6.0 Server” and click Next.

Configuring Apache Tomcat installation location

Select the Tomcat Root folder which has bin folder and click Next.

There are no resources to be configured and hence click Finish.
The configured Apache Tomcat Server will be displayed in the “Servers” view.

Start Server

It is easy to manage the server instance. Right-click on the server and start and stop it to ensure its proper working.

Test your installation

After starting the Tomcat, open browser and type http://localhost:8080. You should see the Apache Tomcat home page as shown below.

Showing 3 comments
  • jey.arun
    Reply

    thank you its use full for me.

  • Gayathri
    Reply

    its very clear Thank you

  • manjari
    Reply

    how can we open browser from eclipse

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.