deploy the same application multiple times on tomcat

♀尐吖头ヾ 提交于 2019-12-10 16:59:02

问题


I want to deploy the same applications multiple times on the same tomcat instance for different "customers". Since im not really experienced with tomcat and other application servers i dont have a point to start. When i simply generate war files like app1.war and app2.war (based on the same code) it doesnt work, bc the war files are named diferent but the project is still called the same, so tomcat is confused i think. So i really dont know where to start. Another starting point is to have multiple tomcat sessions for each application but i have a feeling that this is a waste of performance...? I would appriciate if you could point me to the right direction.

Edit: Im using different databases for the different war files. I think that is the problem. How could i chaqnge that? Cheers, m


回答1:


It's not a tomcat settings, but a workaround, but has some advantages that you only need to modify the application once for all the users...

You can use an ID to identify the user that is accessing your application.

Then in your application you will use a different database based on the userID...



来源:https://stackoverflow.com/questions/8092505/deploy-the-same-application-multiple-times-on-tomcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!