开发者

Different session timeouts for different users in same web app

I have a requirement within the same web application to set 2 session timeouts.

60 m开发者_如何学编程inutes for regular users and 3 hours for admin users.

I am told this is not possible and I will need to host a separate web app for the admins.

Is there any workaround?

UPDATE: Thanks to Bozho and Kurt's replies - I have a followup question.

Does session.setMaxInactiveInterval() override the value of session timeout set via web.xml ?


You can try session.setMaxInactiveInterval(int interval)


When I look at the HttpSession interface, I see the following method.

setMaxInactiveInterval(int interval): Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜