Tomcat – Sharing of Session Cookies across Subdomains
Since I have multiple microsites i.e. subdomains on touchsy.com , I needed a way for users to be logged-in to one subdomain and then access other subdomains without having to login again. I found out that it is fairly easy to achieve it through Tomcat context configuration.
Here is the context configuration:
<Context sessionCookiePath="/" sessionCookieDomain=".touchsy.com">
A full reference of tomcat configuration can be found here:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes
Leave a Comment