As per my understanding cookies(like jsessionID) are sent to server from browser if all of the below parameters are same
Parameters are protocol, domain name(or ipaddress + port number), application context
For example :- If I send the request tohttp://localhost:8080/testApp/
and has some cookies associated with this
Now if hit the request to any of the below url, above set of cookies won't be sent
https://localhost:8080/testApp/ (protocol changed)
http://localhost:9001/testApp/ (port changed)
http://localhost:8080/testApp1/ (application context changed)
Is my understanding correct ?
UPDATE :- wiki says the domain is derived from the request domain if domain is not specified. I believe same is true for path/application context. It means if path and domain attribute are empty , cookies will be specific to requested url but does not depend on protocol(http or https). Is that correct now ?