File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Session time out before it's supposed time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Session time out before it Watch "Session time out before it New topic

Session time out before it's supposed time

Jhonson Garcia

Joined: Aug 27, 2002
Posts: 3
I got a problem with session timeout on my current project.
I already set session timeout to 120 minutes on the web.xml file and I never change the web.xml file nor the classes, but sometime (while mostly using Netscape 6 browser) when I left the jsp pages untouched for about 20 minutes(our jsp pages are protected by security, after session time out pages will thrown to login page) pages will thrown to login page.
I found out this is caused by the session timeouted.
Did somebody ever experienced it before?
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
Try setting the value of timeout in jsp and see if it works.
HttpSession session = request.getSession();
where interval is no of seconds for how long the session object will be kept alive between client requests.
[ August 27, 2002: Message edited by: Snigdha Solanki ]

Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
Jhonson Garcia

Joined: Aug 27, 2002
Posts: 3
Thanks, Snigdha..
I've tried on one or two pages, so far the session doesn't time outed under 20-30 minutes, but I didn't sure it works 100%, perfectly.
So I didn't apply it to my pages, cos' there are hundreds of jsp pages I have.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Session time out before it's supposed time
It's not a secret anymore!