• Post Reply Bookmark Topic Watch Topic
  • New Topic

session time out in secs.  RSS feed

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can put session time out in seconds in tomcat 4.1 as in web.xml we can put it in minutes. and how ??
regards,
Rahul Juneja
 
Mark Bensing
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use HttpSession.setMaxInactiveInterval(int seconds). This method only affects the session on which it was called; it does not set a default value for all sessions in the web application as <session-timeout> in web.xml does.
Mark
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to apply the same for all the sessions is it possible in any way HttpSession.getMaxInterval method i know .... just tell me hot to sent session timeout in seconds for all the sessions
 
Mark Bensing
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know you can't set a timeout value in seconds that applies to all sessions.
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think we can do it as i tried to put it in .30 in web.xml and it worked out but i was not able to get it how much time was it taking as i was not sure abt the timings bu anyhow it reduced to some seconds...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!