Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

session timeout

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

How to set session timeout in a jsp page as well as a servlet.
I have set the session-timeout in web.xml as

<session-config>
<session-timoeout>1</session-timoeout>
</session-config>

and also set the session timeout in the servlet as

session.setmaxInactiveInterval(60);

I am using websphere and the timeout was set as 40

but the session is not timing out.
what should i do now??
Am i wrong anywhere?
Thanks in advance.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have copy-pasted the code then there is typo in both cases:

(1) In the first case timeout is spelled wrong
<session-timoeout>1</session-timoeout>


(2) In the second case "m" in max needs to be capital
session.setmaxInactiveInterval(60);
[ July 14, 2008: Message edited by: Siddharth Naik ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic