views:

18

answers:

0

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.