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.
精彩评论