I am working on a use-case where I have to redirect between JSF applications deployed on different servers. Kinda login app to main webapp. Initially I have deployed both of these apps on the same server and running them under same domain (localhost).
The two applications are: App A (a login portal) and App B. App A runs at root context e.g. http://localhost:8080/
and App B is at context /app
e.g. http://localhost:8080/app/
. When I redirect (post login) from App A to App B through a plain POST
submit request, App B gets launched under the same browser tab. Upon inspecting session id cookie I see that App B, though a part of different deployment, is sharing same session id as that of App A. The cookie shows the same session id stored under path /
. After launching App B, I was expecting a new session. Is it normal, do I need to create a new session explicitly? Or is it happening because I have deployed both apps war files on the same server localhost:8080
?