0

I have two web applications A and B(both will have http sessions).

When I try to call a servlet at B from a java class in A, session at app B is not retrieved. I tried with Spring RestTemplate and Apache HttpClient, session is coming as null.

Any help would be appreciated.

Thanks

Mahesh
  • 120
  • 9

1 Answers1

0

Each web application maintains its own copy of servletcontext and session objects, so in my opinion, you will not be able to use the http sessions across the web applications even though you have deployed them under the same server.

Vasu
  • 21,832
  • 11
  • 51
  • 67
  • No, I am not using session across web applications. There will be sessions for those two webapps. Session at application B contains some data. I just want to retrieve this data using a servlet call from application A. – Mahesh Sep 21 '15 at 12:54
  • you can have a look, did not realise that almost same query, http://stackoverflow.com/questions/260823/access-session-of-another-web-application – Vasu Sep 21 '15 at 13:18