Is there a way to get request.request.request.session.attributes as seen in the hierarchy in the image? I have tried the following:
Object value = request.getAttribute("Travis");
and
Object value2 = request.getSession().getAttribute("Travis");
However, both return null. I have confirmed the session Id is correct.
Is there a way to grab values from the request this deep down?
CodePudding user response:
I was able to get the data by using the HazelcastHttpSession. HazelcastHttpSession session.
Object value = session.getOriginalSession().getAttribute("Travis");
CodePudding user response:
You can access session directly with HttpSession
:
import javax.servlet.http.HttpSession;
// for instance
@GetMapping("test")
public void test(HttpSession session) {
session.getAttribute("Travis");
}