I have an application (J2EE) which is partly on HTTP and partly on HTTPS. I want to have two session cookies to track a user, one when he on a HTTP page and other for HTTPS page.
I want the HTTPS cookie to secure and http-only. Is it possible?
I have an application (J2EE) which is partly on HTTP and partly on HTTPS. I want to have two session cookies to track a user, one when he on a HTTP page and other for HTTPS page.
I want the HTTPS cookie to secure and http-only. Is it possible?
Yes , you have to call setHttpOnly(true)
, setSecure(true)
on your cookie before sending it to client. Secure cookies are transfered via HTTPS or SSL.