I my application I want to get other user’s session attributes like his name etc.
Is it possible with request.getsession.getAttribute("Other User's attribute key").
Please Help me.
Thanks in Advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The session is per-“user”; that’s the point of sessions.
You could implement a session listener that puts other session data into application context when it’s added/removed. Sessions not explicitly closed will leave data in the application context, though.
What specifically are you trying to do? Why are you trying to access session data from another session?
If you’re not trying to access data from a different session, then you can get and put whatever data you want into the session using
setAttributeandgetAttribute.