Computers |
|
| | #1 (permalink) |
| Newb Techie Join Date: Aug 2005
Posts: 4
| 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. |
| | |
| | #2 (permalink) |
| Junior Techie Join Date: Jun 2005
Posts: 94
| 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. |
| | |
| | #3 (permalink) |
| Newb Techie Join Date: Aug 2005
Posts: 4
| 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. |
| | |