title: multiple domain session handling in servlets
body: <p>I need to share sessions between multiple domains.</p>
  
  <p>By multiple domain I mean, I have one instance of tomcat6 running. And I can access my webapp using urls
  localhost:8080/webapp/test.jsp  and
  myhostname:8080/webapp/test.jsp  (as I configured dns entry in hosts file)</p>
  
  <p>Now,
  The javascript fires ajax calls to localhost:8080/webapp/ActionA  and myhostname:8080/webapp/ActionB</p>
  
  <p>Now it will throw an error for the invalid session.</p>
  
  <p>If javascript fires ajax calls to localhost:8080/webapp/ActionA  and localhost:8080/webapp/ActionB  it will work fine.</p>
  
  <p>Can some one suggest some ways to implement this.</p>
  
  <p>-Thanks</p>