• Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarification about session-timeout in web.xml?  RSS feed

 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

1. what is use of the meaning of the following tag?

<session-config>
<session-timeout>1</session-timeout>
</session-config>
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thennam,

it's the time in minutes a session will exist when there's no user interaction with the session. After this period the session will be invalidated.

Marco
 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply.


That means the value we given the
<session-config>
<session-timeout>1</session-timeout>
</session-config>

will be set into the MaxInactiveInterval of session. am i right?
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly! An inactive session will expire after this number of minutes!

The method getMaxInactiveInterval() returns this value but in seconds!!!
[ May 16, 2008: Message edited by: Marco Ehrentreich ]
 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, i understood ...
 
Prasad Tamirisa
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add to above.....

If you explicitly set this setMaxInactiveIntervel() in JSP or Servlet, the value given in the web.xml will be overridden.
 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your useful information...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!