简体   繁体   English

使用Jersey的会话Cookie

[英]Session Cookie using Jersey

I am getting problem while setting up Session cookie using jersey. 使用球衣设置会话cookie时出现问题。

is there any way to set a session cookie 有什么办法设置会话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. REST应该是无状态的。 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. 您可以使用Response.ok()。cookie()设置cookie,但如果要创建httpsession,则必须自己将其注入上下文。 This is not how it's supposed to work though. 但是,这不是应该如何工作的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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