[jersey-dev] question about jax-rs client and session cookies
Hello, I am having trouble determining why I can't get a session
cookie from my test server.
I am performing the request like this:
Invocation.Builder invocationBuilder =
Response response =
This works as expected on a production (https) machine.
On my test (localhost, non-https), however, there is no cookie.
But I can check with wget or a browser and see that a cookie is
being sent to clients:
wget --keep-session-cookies --save-cookies /tmp/cookies.txt -S http://localhost:8080/hiwish/
--2020-05-07 16:12:43-- http://localhost:8080/app/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response...
Set-Cookie: JSESSIONID=837D220DC49BD43242A3C13B0662FFD6; Path=/app; Secure; HttpOnly
Date: Thu, 07 May 2020 23:12:43 GMT
Length: unspecified [text/html]
Saving to: ‘index.html’
index.html [ <=> ] 19.12K --.-KB/s in 0s
2020-05-07 16:12:43 (46.9 MB/s) - ‘index.html’ saved 
guymac@kal-el:~/winhome$ cat /tmp/cookies.txt
# HTTP cookie file.
# Generated by Wget on 2020-05-07 16:12:43.
# Edit at your own risk.
localhost:8080 FALSE /app TRUE 0 JSESSIONID 837D220DC49BD43242A3C13B0662FFD6