title: Questions about sessions on Tomcat. 2 war webapps
body: <p>I want to ask a couple questions about tomcat session lifecycle if we are deploying it using 2 war files.</p>
  
  <p>We have the situation when we are logged in the first web app (war1) and put in the session some attributes.</p>
  
  <p>After this we open a new tab at the same browser for war2 and then inside filter we are receiving request that contains new session with new cookie.</p>
  
  <p>So, is it possible to somehow share session attributes on 2 different wep apps (2 dofferent war files under 1 tomcat instance).</p>
  
  <p>Is it possible to have 1 session for 2 web applications?</p>
  
  <p>For example if I open 1 tab in the browser for war1 I am getting sesionId 123ASD, and then if I open second tab for war2 it will contain same sessionId: 123ASD.</p>
  
  <p>Is this situation possible ?</p>
  
  <p>Is there any ways to configure Tomcat ?</p>
  
  <p>I have tryid toput this valve inside server.xml file:</p>
  
  <pre><code>&lt;Valve className="org.apache.catalina.authenticator.SingleSignOn" requireReauthentication="true"/&gt;
  </code></pre>
  
  <p>And add crossContext="true" value for <code>&lt;Context crossContext="true"&gt;</code> at context.xml file but it doesn't helped at all.</p>