Saturday, 26 May 2018

How To Create Multiple Instences of Tomcat 9

Tomcat 9 Multiple Instences


If you want to deploye multiple web applications on a single tomcat server then follow these simple steps.


  1. First we need a fresh installation of Tomcat Server 9. 

  2. Now create a directory like [C:\Program Files\Apache Software Foundation\tomcat-1].

  3. Copy bin, conf, logs, webapps and work directories from tomcat’s root [C:\Program Files\Apache Software Foundation\Tomcat 9.0].

  4. Now first configure server.xml for new instance (tomcat-1) [C:\Program Files\Apache Software Foundation\tomcat-1\conf\server.xml].

  5. Deploy your web app in webapps directory [C:\Program Files\Apache Software Foundation\tomcat-1\webapps\MyWebApp].

  6. Now you need to install your tomcat instance as a windows service.

  7. Move into [C:\Program Files\Apache Software Foundation\tomcat-1\bin] directory and rename Tomcat9.exe to tomcat-1.exe and Tomcat9w.exe to tomcat-1w.exe

  8. Open cmd at path [C:\Program Files\Apache Software Foundation\tomcat-1\bin] and run this command.

  9. tomcat-1.exe //IS//tomcat-1

  10. After this you will see your newly created tomcat-1 windows service in Windows Task Manager.

  11. Now run tomcat-1w.exe and configure it like your root tomcat properties.