This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to maintain session in Both Parent window and child window

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • 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
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic