Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-14-2005, 02:50 PM   #1 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 4

Jimit286

Default session timeout problem

I am using Websphere as my HTTP/Application server with my JSP,JAVA based website.

I have configured the session timeout in Websphere(30 mins).

Now while all works fine under normal conditions, i face a serious problem under one situation...

Illustration: Suppose i have logged in and then keep the webpage open and subsequently the session times out after 30 mins...But now if i click any links on this page then a new window(which is href'ed) opens and goes in an infinite loop...

I need to find a solution such that after session time out,on clicking any link the user be directed to the login page.

please help...

thanks.
Jimit286 is offline  
Old 09-16-2005, 08:53 AM   #2 (permalink)
 
Junior Techie

Join Date: Jun 2005

Posts: 94

ever_thus

Default

If your serevr can handle php I would do it like this.

Instead of href-ing to a new window link to a generic php page with a parameter indicating which link was clicked, like so:

<a href=page.php?parameter="linkname">

In the php page begin with a simple test:

if (session timed out){
header (location:login_page)
}

then test for each link like so:

if (parameter==link1){
header (location:page for link1)
}
elsif (parameter==link2){
header (location:page for link 2)
}
...


I'm not sure about the exact syntax I've used, but the logic can definitely be followed in php.
ever_thus is offline  
Old 09-17-2005, 05:23 AM   #3 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 4

Jimit286

Default thank you

hey buddy thanks for the logic.

but i worked out another soultion...just in case you might be interested.

i made a new jsp page and out the session timeout check in this page...then i included this jsp in my other jsp's.

thank you once again..

bye.
Jimit286 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On