Saturday, September 6, 2014

How to Configure Multiple Tomcat Server in Same Machine

INTRODUCTION

This post will help to us to configure multiple tomcat server into the same machine/server.

Sometimes there is a need for setting up multiple tomcat to debug the application.

I came across this situation I wanted to debug two different version of my application at same time and check the value for an object.

Following are the steps to achieve it.

Step 1

Install tomcat with two different names as below
  1. C:\Tomcat6.0-1 (with http port 8080)
  2. C:\Tomcat6.0-2 (with http port 8090)

Step 2

Open the C:\Tomcat 6.0-2\conf\server.xml and modify the below lines.
  1. Change  port="8006" on <Server port="8005" shutdown="SHUTDOWN">
  2. Change  port="8010" on <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Step 3

Don't do any change on C:\Tomcat6.0-1. By default settings can be used.
  <Server port="8005" shutdown="SHUTDOWN">
  <Connector port="8080" protocol="HTTP/1.1" >
  <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Now you can able to connect the application as below.
Now Tomcat-1 can be connected using URL: http://localhost:8080/<your-application>
and Tomcat-2 can be connected using URL: http://localhost:8090/<your-application>

No comments :

Post a Comment