tomcat unique context for each subdomain -


i developed j2ee webapp.

this webapp contains several subdomains (ar.app.ma, en.app.ma, app.ma ...).

i realized deployment, each subdomain has own context, therefore, own objects, different of other subdomains)

this has consequence of unpleasant phenomenons. example, user logs on www.app.ma not automatically connected ar.app.ma). connection pool in session instantiated many times there subdomains configured.

you know way modify config subdomain (or context of each of webapp) subdomains have same unique context?

i found solution on tomcat official website.

in tomcat, host names , web apps bound in many-to-many relationship. there 1 host entry each host. when multiple host names bound same web app, 1 can use tomcat's aliases facility.

<host name="www.mycompany.com" ...>   <alias>mycompany.com</alias>   <alias>en.mycompany.com</alias>   <alias>fr.mycompany.com</alias> 


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -