spring mvc - Tomcat or JBoss hosting 1 webapp with multiple websites -


i want have 3 websites, distinct public domain names share common java back-end springmvc server , use common static web resources js , css files.

rather maintaining ui code in 3 places, i'd rather run 1 server , deploy 1 war on tomcat8, jboss or wildfly cloud instance openshift or aws, still able configure dns cname's point different paths on war.

for example, here each domain map respective endpoints not have visibility of others:

www.mydomaina.com ---> mycloudprovider.ip/sharedcontext/a www.mydomainb.com ---> mycloudprovider.ip/sharedcontext/b www.mydomainc.com ---> mycloudprovider.ip/sharedcontext/c 

is possible? if so, steps configure?

it beneficial configure 3 separate projects. need have own application contexts, can share single parent pom. result in better load balancing performance. also, since amazon's pricing structure such cheaper set 3 micro instances 1 powerful instance run 3 wars. note: can still have 3 instances pointing same datasource.

to solve problem of duplicate webapp code, can create pom overlay using maven-war-plugin. when maven applies overlay apply union of files app files overlay. files intersect used app rather overlay.

to solve problem of duplicate java code, can separate common code new project , build jar use dependency.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -