Saturday, February 1, 2020

Adding Tomcat Server to Eclipse

This post shows how you can add Apache Tomcat server to the Eclipse IDE and start and stop it from Eclipse IDE itself.

Downloading Apache Tomcat Server

If you don’t have Tomcat server yet you can download it from here- https://tomcat.apache.org/download-90.cgi

Latest version at the time of writing this post is 9.0.10.

Once downloaded, extract it to a folder.

Adding Tomcat server to Eclipse

In Eclipse IDE, go to Servers tab and in the Server area- Right click – New – Server

Adding new server eclipse

In the opened “Define a New Server” window expand Apache and select the Tomcat version you want to configure. For example if you have downloaded Tomcat 9.x version then select Tomcat v9.0 Server. Click Next.

defining new server

In the next window browse to the directory where you have extracted your downloaded Tomcat server. Ensure that the correct Java version is also selected.

adding tomcat server

If you already specified some resources to run with Tomcat, in the next window you get a chance to add those resources to the configured Tomcat server. For example I already have one Spring Web MVC application configured to run on Tomcat server so I can add it to the configured server in this window. Click Finish.

add resources to Tomcat server

You should see a new Tomcat server added in the Server area. On double clicking it you can see the configuration for the server and right clicking it will give you option to start, stop, clean etc.

tomcat server in eclipse

That's all for this topic Adding Tomcat Server to Eclipse. If you have any doubt or any suggestions to make please drop a comment. Thanks!

>>>Return to Java Advanced Tutorial Page


Related Topics

  1. How to Pass Command Line Arguments in Eclipse
  2. Creating a Maven Project in Eclipse
  3. Reflection in Java
  4. Spring Example Program Using Automatic Configuration
  5. Spring Web MVC Example With Annotations And XML Configuration

You may also like-

  1. Serialization in Java
  2. Object Cloning in Java
  3. Nested Class And Inner Class in Java
  4. Garbage Collection in Java
  5. String Vs StringBuffer Vs StringBuilder in Java
  6. Array in Java
  7. Lazy Initializing Spring Beans
  8. Introduction to Hadoop Framework