Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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

Session Expires Problem, Help!

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am working on a bug in my application, the problem is, the session expires every 2 minutes or so and I have to log back in to continue, this is very frustrating. How do I go about debugging this? Which areas of the code do you guys think would be best to check for errors?
Any inputs would be very appreciated.
Thanks.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Check any setMaxInactiveInterval(int time) method,change value of argument
or
sometimes session inactive time is also specified in xml file using a tag
change value there.

As per my knowledge these are the two ways to get rid of the problem.
If you find any other solution just post it yaar
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check Web.xml file,where it is defined,please post the solution if you have any other solution
 
v ray
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
yeah, the first thing I obviously checked for was the web.xml, but it had:
<session-config>
<session-timeout>3600</session-timeout>
</session-config>

So, there was this one page which was creating problems, so I checked the jsp code and I found this one wierd part, and i commented it out and it seems to be working fine.

function funClosing()
{
if((window.event.clientX<0) || (window.event.clientY<0))
{
location.href = '/aw-supervisor/LogoutAction.do';
}

}
I am not sure what functionality the application writer wanted this to provide, but it seems to be that everytime i do something manually outside the window or whatever, the control goes to the logoutAction page and was setting the session value to null and ruining the entire thing.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic