-1

I have 3 applications running on the same server (GlassFish 4.1). Now each application have the same session timeout - 30 minutes. But I would like to change this, this time will depends on the application.

Example:

App 1 - 30 minutes App 2 - 20 minutes App 3 - 10 minutes

Is it enough if for each allocation I will set up:

<session-config>
     <session-timeout>30</session-timeout>
</session-config>

And question number two: On GlassFish server I set up Web Container -> Session Properties -> Session Timeout to 15 minutes. What will be priority for server, time from application or from server set up.

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Eiten
  • 73
  • 8

1 Answers1

0

By default, a servlet container (i.e. Java web server) defines the global value of session timeout for all Java web applications – e.g. the default session timeout in Tomcat is 30 minutes. And you can override the default timeout value for an individual web application on the server. using XML or Java code. Setting time out in java code overrides xml changes.

Please refer the link below. https://www.codejava.net/java-ee/servlet/how-to-set-session-timeout-for-java-web-application