This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a JSP page which creates a child window(displaying some data )on clicking "generate data" button.On this child window i have different functionalities like refresh data, mail data ,etc.
Now after getting the child window i shut down my Tomcat . When i restart my tomcat.ANd then click anything on the parent window ..it gives me a message saying relogin(it is programmed this way). So i relogin with the same earlier login name and password .
Now the child window which was created before tomact was shut down is still there . And if i click the REFRESH button on this window (...or any other button ) the data refreshes,. But the expected behavior is that it shoul say that This window has expired and it should close ... This is my problem...
Actually to check that whether a page has expired .i check for the session id of that page and the login credentials stored in session . Now when i do session.getId() in the action class that is called on clicking REFRESH ..it gets the session from parent page .But this parent page is valid now as i logged in again after restarting the Tomcat.
So how do i in validate this child page ??? Or tell me a way to close all the child pages of a page when i relogin( But i do not have any reference of child window... neither their name or object)