I have two virtual hosts in server.xml of tomcat 7
<Host name="www.mydomain.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="MyApp1" />
</Host>
<Host name="sub.mydomain.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="MyApp2" />
</Host>
Is there a way to share the session data between them? e.g. Users logged in MyApp1 does not need to login again when they open MyApp2.