Reputation: 1838
I am using embedded Grizzly 2.2.X
web server. I want to know where I can set the session-config for default session timeout. It is easy to do such thing with normal web containers.
However I still found nowhere to do this with Grizzly
.
Upvotes: 1
Views: 1286
Reputation: 985
You can call setMaxInactiveInterval(int) on the HttpSession object. It's probably easiest, since Grizzly 2.2.x doesn't currently using a deployment descriptor, to call setMaxInactiveInterval() within HttpSessionListener.sessionCreated().
Upvotes: 1
Reputation: 15758
GrizzlyWebServer server;
//do your things
server.getSelectorThread().setKeepAliveTimeoutInSeconds(timeoutSeconds);
Upvotes: 1