2

i already have one web application up on port 8080 on tomcat. Now i have another web application which i have got as war file. Both webapplications will be communicating with each other. i have been told by my senior to deploy this second web application on different tomcat directory on same machine. While doing this i came up with these two another options:-

1) we can deploy second webapplication on different port say 8888 on first tomcat directory itself.

2) we can deploy second webapplication on same port on first tomcat directory itself.

Option3 as suggested by my senior :- Deploy second webapplication on another tomcat directory on same machine itself.

As per my understanding there is no difference among above three options. Is that correct?

i am not getting the rationale behind deploying second webapplication on another tomcat directory which is on same machine itself ?

This question is same as at Installing two different webapplication on two different installed tomcat directory on same machine? but some body closed it marking it duplicate which is not as This question is not about how to deploy but it is about choosing the right option .So its not duplicate entry. Please answer the question.

Community
  • 1
  • 1
M Sach
  • 33,416
  • 76
  • 221
  • 314

1 Answers1

1

The answers in this post how-to-deploy-mutiple-web-application-in-tomcat-which-will-run-on-different-port which was also mentioned to you, in your closed question exactly address your problem.

What your senior suggests to you is, essentially the same as Bozho's recomendation which is to deploy the web application via another Tomcat i.e. use 2 servers.

Your other thoughts are covered by Bozho's second part of the answer and the answer of Sean.
I.e. in order to deploy the web application in the same Tomcat but in different port you need to configure your connectors and your setup accordingly.

This is rather tedious and the approach that your senior suggested is more simple and straightforward.

Otherwise look into the answers into the other thread

Community
  • 1
  • 1
Cratylus
  • 52,998
  • 69
  • 209
  • 339
  • Thanks user384706. I agree Bozho recommended using the another tomcat.He pointed it out that it will be easy if we deploy on different tomcat. But is it only convenience or some other factor too (will the performance will improve if we deploy on different tomcat). What i want to understand is what is the difference if we deploy the app on same tomcat on different port vs deploy the app on same tomcat on same port vs deploy the app on different tomcat. Thats my intention. – M Sach Dec 11 '11 at 03:29
  • My question to you is, how come you are not addressing these questions directly to your senior engineer that put you this task?From my point of view, I don't know what he has in mind. Perhaps he wants a second server for higher availability e.g. one Tomcat instance crashes the other is still there. Or perhaps it is easier and does not want to modify the Service's configuration of Tomcat. Perhaps some other reason. So I don't understand why you didn't ask him in the first place an then investigate if his reason/argument makes sense or not – Cratylus Dec 11 '11 at 08:46