This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Would you please help me how to identify session between two web applicaitons. When a user clicks link to second application from first. I want to close his sesion on first appl and want to maintian count of live sessions on first application.
I have tried with HttpSession and HttpActivationSession but no use.
Hi sammeta, I wanted to respond to your P.M. about this topic.
The only thing that I really can say is to agree with Jeanne. If you are following a link to an application you control then you can provide an IFrame that goes back to the first app and logs the user out. A similar alternative would be to make any links to the second application a link to a logout page in application 1 that then redirects to a page in application 2. This way you can keep the session control in a single app (you could pass the URL to application2's page as a parameter to the logout page).
As Jeanne said, you still can't tell if the user goes to some other website, or closes their browser. In addition to those limitations, the one I proposed also wouldn't work if the user makes bookmarks for the application2 page, or manually enters the application2 page's URL into the address bar.
<p.s. sammeta, I am happy to help, and don't mind the P.M.s asking me to take a look at a particular thread. But as an FYI I will always respond in the thread itself, since it will help the JavaRanch community as a whole>