简体   繁体   中英

Session Cookie using Jersey

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM