You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring MVC forwards the request when you return "forward:/api/createSession" from your controller's request handler method - by using javax.servlet.RequestDispatcher#forward
Tomcat's javax.servlet.RequestDispatcher implementation org.apache.catalina.core.ApplicationDispatcher wraps the request in an org.apache.catalina.core.ApplicationHttpRequest instance in its doForward method.
ApplicationHttpRequest implements getSession() method and has no knowledge about the Hazelcast session. When getSession() is called on the request, it doesn't get the session from Hazelcast.
Different version of Tomcat have the same problem. We might look into how other containers behave, but ultimately we need to make sure it works on all containers.
I'm having the same problem when I use RequestContextHolder.currentRequestAttributes().getRequest().getSession() the Hazelcast session object is ignored. The ApplicationHttpRequest gives another(new?) session object. Is there any progress on this issue?
"forward:/api/createSession"
from your controller's request handler method - by usingjavax.servlet.RequestDispatcher#forward
javax.servlet.RequestDispatcher
implementationorg.apache.catalina.core.ApplicationDispatcher
wraps the request in anorg.apache.catalina.core.ApplicationHttpRequest
instance in itsdoForward
method.ApplicationHttpRequest
implementsgetSession()
method and has no knowledge about the Hazelcast session. WhengetSession()
is called on the request, it doesn't get the session from Hazelcast.Different version of Tomcat have the same problem. We might look into how other containers behave, but ultimately we need to make sure it works on all containers.
See #47 for more history on the issue.
We have a reproducer thanks to @michael-kalpana
forward-bug-patch.zip
The text was updated successfully, but these errors were encountered: