Computer ForumsComputers  

Go Back   Computer Forums > Programmers Lounge > Programming Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 09-14-2005, 01:50 PM   #1 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 4
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   Reply With Quote
Old 09-16-2005, 07:53 AM   #2 (permalink)
Junior Techie
 
Join Date: Jun 2005
Posts: 94
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   Reply With Quote
Old 09-17-2005, 04:23 AM   #3 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 4
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   Reply With Quote
Reply

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



All times are GMT -5. The time now is 11:20 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0