• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to maintain session in Both Parent window and child window

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sir,
I am using session concept in application.

After login my application the Main screen screen is comming which we call parent window.
Under the parent window serverral child window are comming.

Suppose i click one child window under the that same parent window and when session time out.
if i do any operation in child window then session message comming and saying"Session time out".

It will close only child window.

My doubt is if session is time out if we also in clind it should aslo close parent window.But in my
case when session expire if you performed something if child window it also close parent window.

if you do some work in parent window and open clild window then clind window close at the session expire time.
Viceversa situation not working.

For example.:Login.jsp(Firstpage)Once we login then we goto home.jsp(Parent window)
Under the parentwindow serveral submenu is thier and child link also thier.

When we open submenu underHome.jsp do some work and same time onen child window and
session expire it will go to Login.jsp(Which is correct).

But if we open clild window and do some work and session expire it only close child window.
again we click parent window then it come to Login.jsp..

Could you please advise me on session expire The child window and parent should close automatically
if we perform anything in any window(Parent window and child window).


Please advise me for the neeedful.

Thanks in advance
Regards
Sumanta Panda
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make use of Javascript´s setTimeout() function and the value from ${pageContext.session.maxInactiveInterval} which returns the remaining session lifetime in seconds.
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot close a window you did not open. So if your parent window is not one that was opened with window.open() you cannot close it. Why would you want to? How rude would that be?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic