servlets - JSESSIONID Issue When Tomcat Server is Acting As a Proxy for Another Tomcat Server -
i have (1) tomcat server app. proxying calls second (2) app server (3rd party), in:
end-user --> (1) tomcat server app --> second (2) app server
when end-user authenticates (1) tomcat server app, (1) tomcat server app, in turns logs second (2) app server on end-users behalf.
the second (2) app server generates jessionid. need jessionid 1 associated end-user interacting (1) tomcat server app.
the issue seems second (2) app server maintaing single session (1) tomcat server, if multiple end-users interacting (1) tomcat server, end sharing single session.
(i hope made sense)
what proper way handle situation?
thanks in advance help!
how invoke app2 app1 ? using http client library or similar?
the issue seems second (2) app server maintaing single session (1) tomcat server, if multiple end-users interacting (1) tomcat server, end sharing single session.
i can see 2 options
you can store jsessionid of second app in session of first app. every time proxy second app first, jsessionid of 2nd app user session on first , include in request
the first time receive jsessionid app2, send cookie in response user. every subsequent call automatically have jsessionid flowing app1 proxied app2. achieve this, have change session cookie name app1 else.