scenario:user visits web container A(Apache Tomcat), A set values in session scope,
HttpServletRequest.getSession().setAttribute(“key”, “value”);
and redirect user to another web container B(a php server).
HttpServletResponse.sendRedirect("path to server B");
Could B get the same values in session scope which's set by A?
HttpServletRequest.getSession().getAttribute(“key”);
according to this question, java servlet application scope redirect
it seems possible, though it might be redirecting to the same container, the httpsession would be in the same VM, or another container in the load-balancing server, httpsession could migrate between these container, thus httpsession would stay still in these two cases.
what if I want to pass attributes between two different server(java and PHP) while redirecting?
wish I do express my thoughts right, any advice would be appreciated, thank you.