• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can anyone give me the session time out example code

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi iam fresher
can anyone give me the session time out example code
thanks
jayesh
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What session timeout example code?
What are you trying to do?
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jayeshjayram khanvilkar:
hi iam fresher
can anyone give me the session time out example code
thanks
jayesh



u can use session.setTimeout();
or, else you can mention that into the web.xml of that application context.

cheers!
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jayeshjayram khanvilkar:
hi iam fresher
can anyone give me the session time out example code
thanks
jayesh



u can use session.setTimeout();
or, else you can mention that into the web.xml of that application context.

cheers!
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rahul Bhattacharjee:
u can use session.setTimeout();
or, else you can mention that into the web.xml of that application context.



We dont have such method. Please refer to the docs.
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it's some setting in web.xml. Probably - session-config.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jayeshjayram khanvilkar:
hi iam fresher
can anyone give me the session time out example code
thanks
jayesh



Hi,

You can do this in two ways
1. in your web.xml

<session-config>
<session-timeout>10</session-timeout>
</session-config>

2. in the servlet

session.setMaxInactiveInterval(600);

note :10 is in minute and 600 is in second

Cheers,

Sunil..
reply
    Bookmark Topic Watch Topic
  • New Topic