开发者

JSF "Remember me" option

开发者 https://www.devze.com 2023-02-09 23:44 出处:网络
In other languages when a user logs in you can set the expire date of a cookie really far from today\'s and you can achieve this. How can I imp开发者_Python百科lement this in JSF2? I have a jsf sessio

In other languages when a user logs in you can set the expire date of a cookie really far from today's and you can achieve this. How can I imp开发者_Python百科lement this in JSF2? I have a jsf sessionscoped bean but how can I maintain this session for a long time?.


You can add cookies with JSF as well:

FacesContext.getCurrentInstance().getExternalContext.addResponseCookie(..)

in the parameters map you can set the expiration date - see the documentation for all parameteres


I know this is tagged JSF but I recommend you look into Spring's Solution to the Remember Me problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消