• 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

sharing session/cookies between applications

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a scenario where I have two servlets runnings in diff contexts, Servlet A in App servers context and B in web servers context.
When logging A captures the user name and password, opens a HttpURLConnection to B and passes the user name and password which is stored in a session.
After a few navigations in A, when I call servlet B, the data I have put in B is lost
Why is this problem, dose sending data through HttpURLConnection has something to do with this?
This is the problem with cookies as well, I can set the cookies but later when I try to retrive them, then are not available.
Regards,
Javed.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have asked almost the same question before here
The fact that they are in different contexts means the serevr will do everything it can to keep them separate - it won't allow you to share information.
You will have even more problems since they are running in different servers - one in a web server and the other in an application server.
In practice, if they are running on the same server you can sometimes reach from one context into another to gather data, but this is app server dependant and therefore not very reliable.
Dave
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic