Alone as an Island What’s the pride in being a Programmer?
Sep 14

The number of MINUTES after which a web app times out is defined in the web.xml this way.

<web-app>
….
<session-config>
<session-timeout>60</session-timeout>
</session-config>
….
</web-app>

The WebLogic Server waits TimeoutSecs (in SECONDS) before timing out a session as shown below:
The default value, if not specified, is 3600 secs.

<weblogic-web-app>
….
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>7200</param-value>
</session-param>
</session-descriptor>
….
</weblogic-web-app>

When timeout is set in both the deployment descriptors, the web.xml entry OVERRIDES the one defined in the weblogic.xml. This preference can be changed by a special value.

<session-config>
<session-timeout>-2</session-timeout>
</session-config>

This will let the app use the TimeoutSecs defined in the weblogic.xml for session time out.
There is yet another special value -1, in which case the session never times out. Of course, the weblogic entry is overriden in this case too.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • description
  • Furl
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • TwitThis

Tags:

One Response to “Session Timeout - A difference”

  1. Jenny Says:

    If server time out after a period of time, what will user see? Can you tell the server to display a customised page when server timeout?

Leave a Reply

Give your best to the world.