Tomcat – Sharing of Session Cookies across Subdomains

less than 1 minute read

Since I have multiple microsites i.e. subdomains on , 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="">


A full reference of tomcat configuration can be found here:

Leave a Comment