Dear Ivy support,

Using Ivy 6.2 we set the User session time-out value in the web.xml. Is there a way to extend the session validity programmatically without any User action?

In a JSF context, would this method have any effect on the Ivy Session ? javax.faces.context.ExternalContext.setSessionMaxInactiveInterval(int interval) Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.

Thanks in advance Emmanuel

asked 31.03.2017 at 10:47

Emmanuel's gravatar image

Emmanuel
(suspended)
accept rate: 66%


Hi @Emmanuel

Ivy sessions are mapped to the http sessions. If the webserver (tomcat) destroys a http session, the ivy session will be also destroyed.

The only way to modify programmitcly the session timeout seems to be the following way: http://stackoverflow.com/questions/2960764/how-to-set-session-timeout-dynamically-in-java-web-applications Create your own HttpSessionListener and register this one in the web.xml. But this is probably not what you want.

In a JSF environment you should have another opportunity, as you mentioned:

javax.faces.context.ExternalContext.setSessionMaxInactiveInterval(int interval)

And as the documentation says: Servlet: This must call setMaxInactiveInterval on the underlying javax.servlet.http.HttpServletRequest instance.. The jsf context implementation will modify the session timeout on the http session.

link

answered 03.04.2017 at 16:05

Alex%20Suter's gravatar image

Alex Suter ♦♦
3.1k122247
accept rate: 84%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×26
×14
×1

Asked: 31.03.2017 at 10:47

Seen: 6,412 times

Last updated: 03.04.2017 at 16:05