I am getting problem while setting up Session cookie using jersey.
is there any way to set a session cookie
using jersey.
thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no such thing as a session in Jersey. Not by default anyway. REST is supposed to be stateless. You can set cookies using Response.ok().cookie() but if you want to create an httpsession you have to inject it into the context yourself. This is not how it’s supposed to work though.