Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Close window on JSP Session TIME-OUT

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ei Ranchers,
I need a urgent reply for the following issue.

On session time out, my page is directed to a login page (index.jsp). But instead I want the window to be closed

Why i need such a requirement is, I have a main page and various inks in that main page that pops up new child windows. Now, if the user is inactive in the child window and session timesout, I am getting the login page inside the child window, which should not happen..

Is there any control within the jsp like

onSessionTimeOut()
{
closewindow();
}


Thanks,
Rancher
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please try the below its a Java script
function logout() //you function name
{
window.close();
}
Regards,
Aravind
 
karthick ryan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya, window.close() closes the window.
But how will i know that the session has timed out?

I am mainly concerned on the condition to check whether session has expired.

thanks
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it you can not close the child window when the session is time out
because session is relate to user, when the session is expire it come to direct login page.
 
karthick ryan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i dont want the login page. I want to close the window if the session is timed out(since user was inactive on the page).
 
Amit Kumargupta
Ranch Hand
Posts: 54
 
karthick ryan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But is it not possible to check without these 2 classes being implemented. Cos, i dont want to update my jar files consisting of all the necessary class files.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "dwky dwky",

please check your private messages.

Thanks,
Ulf
 
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi "google",

Please check your private messages.

Katrina Owen
Saloon Bartender
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic