views:

63

answers:

2

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

60 minutes 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 ?

+2  A: 

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.

Kurt Du Bois
+5  A: 

You can try session.setMaxInactiveInterval(int interval)

Bozho
I think your replys was marginally quicker than Kurt
ktaylorjohn