• 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

page timeout

 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying the following code to timeout a specific JSP. But it is not working.

<%
HttpSession hsObj = request.getSession();
hsObj.setMaxInactiveInterval(50);
%>

It is in the header(starting point of the JSP). Is there another setting that will supercede this expire request???

May be Bear can help me on this.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot timeout a specific JSP. What requirement are you trying to achieve?
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
You cannot timeout a specific JSP. What requirement are you trying to achieve?



Basically I need to timout the user session.

Main usage is in the login/registration screens. Scenario is that user enters some info on the registration(could be some sensitive stuff) and gets busy with other issues in life. If the user has not done any activity on the screen for about 20 minutes in the above screens, we need to timeout the session and inform the user to enter all the info again.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So why not just set the session timeout to 20 minutes in the config file?
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we already have 30 minutes for the session sitting on other pages. 20 minutes is the requirement for these specific pages.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then you'll have to do with a client-side Javascript timeout. There is no way to specify different session timeouts for different pages since they all share the same session.
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what happens say we set to 20 minutes in web.xml??

If the user is sitting on initial registration page and was idle for 20 minutes after last entry, he will see a error page??
 
reply
    Bookmark Topic Watch Topic
  • New Topic