Mysterious HttpSession and session-config dependency

Posted by OneMoreVladimir on Stack Overflow See other posts from Stack Overflow or by OneMoreVladimir
Published on 2012-06-05T16:37:33Z Indexed on 2012/06/05 16:40 UTC
Read the original article Hit count: 196

Filed under:
|
|

Good day. I'm developing a Java web app with Servlets\JSP using Tomcat 7.0. During request from client I put and object into the session and use forward. After the forward processing the same request the object can be retreived if the secure parameter is false otherwise it is not stored in session.

    <session-config>
        <session-timeout>15</session-timeout>
        <cookie-config>
            <http-only>true</http-only>
            <secure>true</secure>
        </cookie-config>
        <tracking-mode>COOKIE</tracking-mode>
    </session-config>

I've figured out that "...cookies can be created with the 'secure' flag, which ensures that the browser will never transmit the specified cookie over non-SSL...". I've configured Tomcat to use SSL, but that haven't helped. Changing the tracking mode to SSL haven't helped as well. How do session-config and HttpSession object correlate in this case? What could be the problem?

© Stack Overflow or respective owner

Related posts about session

Related posts about java-ee