开发者

How to run multiple instances of a single GWT application with different web.xml files on different subdomains?

开发者 https://www.devze.com 2023-01-12 11:11 出处:网络
I\'ve a GWT application, I run my application on tomcat开发者_高级运维 server. My application only uses MySQL database to save & retrieve all needed data & has no side effect on file system (I

I've a GWT application, I run my application on tomcat开发者_高级运维 server.

My application only uses MySQL database to save & retrieve all needed data & has no side effect on file system (I mean it does not change any file on it's deployment path).

Now I want to run multiple instances of my application on different subdomains, the only different between these instances is that thay use different web.wml (& context.xml) files (so they will use different databases).

Is there any way to deploy ONLY 1 INSTANCE of my .war file & configure tomcat to use a different web.xml file (according to the requested subdomain) when access the application using dirrefent subdomains ? For example :

IF SUBDOMAIN IS "subdomain1.mydomain.com" THEN USE "web1.xml"

ELSE IF SUBDOMAIN IS "subdomain2.mydomain.com" THEN USE "web2.xml"

ELSE USE "web3.xml"

where all subdomains point to a single directory which my application has deployed on it.

0

精彩评论

暂无评论...
验证码 换一张
取 消