Question by Thunderbird
I have a condition where I want to remove the attribute from the session and I am doing response.sendRedirect after that.
But I am not sure if it will remove the session attribute ? Any thoughts ?
P.S. I have to do sendRedirect, I cannot use forward.
ANSWER : Just a little debugging solved my concern. I checked the session attribute value by getting the variable and it was null. So it removed the variable from the session.
Answer by Starx
Constants.USER_REQUEST_URI gives the correct name as it is stored in session, then it will remove them.
Session work differently than GET and POST request so redirecting and forwarding will make no difference.
Good way to confirm this, would be to check if the variable is accessible after the redirect