• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to find session btn two web appl

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

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.

Please help me.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
session can not be shared between two different web application
 
sammeta Phanikumar
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks For your reply,

Session can not be shared. ok..but want first appl to be notified when a session leaves his appl.
 
Sheriff
Posts: 67746
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
Please use real words when posting to the forums. Abbreviations such as "btn" in place of "between" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sammeta,
You can know when they logout or a session timeouts. If they are going to another app you control, you can include a hidden iframe with a logout link back to the first application.

However, you wouldn't always know when they left as they could go to a different website or close the browser. The only way to know for sure is with constant pinging which is a drain on resources.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic