title: Can Tomcat provide seperate (or HTTPS only) sessions for HTTPS requests?
body: <p>I have a web application which contains both secure (SSL) and non-secure pages.</p>
  
  <p>A user can login to the site and must appear logged-in in both the SSL and non-SSL areas.</p>
  
  <p>(NB. SSL isn't implemented via Tomcat, but via Apache HTTPD servers which sit in front of Tomcat - so Tomcat has no SSL configuration.)</p>
  
  <p>The logged-in state is currently maintained via a servlet session (using Tomcat's vanilla session management).</p>
  
  <p>The obvious issue with this approach is that the JSESSIONID cookie is transported over both HTTP and HTTPS connections, meaning that it's potentially possible to intercept it and hijack the session.</p>
  
  <p>Are there any solutions to this without rolling our own session management (i.e. does Tomcat cater for this situation)?</p>
  
  <p>I'm prepared to implement our own session management, but don't want to reinvent something that may already be supported.</p>