0

I want to setup session timeout to 15 minutes. I set server.session.timeout to 900 and it works when I run the app in the provided Tomcat. However, when I deploy the application on the JBoss session timeout doesn't occur after 15 minutes. How can I achieve this?

1
  • Can you share your web.xml or the code where you configured the timeout ?
    – Vasu
    Oct 27, 2016 at 12:15

2 Answers 2

1

In spring boot server.session.timeout is in minutes not seconds.

In your web.xml, number is in minutes.

<web-app ...>
    <session-config>
        <session-timeout>20</session-timeout>
    </session-config>
</web-app>
2
  • I think that server.session.timeout property does not apply on JBoss, since I had it set to 900, but the session expired after 30 minutes...
    – dplesa
    Oct 27, 2016 at 14:32
  • 1
    You need to override the deault developer.jboss.org/wiki/HttpSessionTimeout
    – Essex Boy
    Oct 27, 2016 at 14:42
0

If you are using Spring Boot, you can add the below property to your WEB-INF/application.properties (if you don't have one, create it under WEB-INF folder):

server.session.timeout=900

For more details on application.properties, you can refer the below link:

http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.