Inside filter I am trying to set one attribute to the current http session. Then I am redirecting to another resource using response.sendRedirect(). The resource sends the request back to the filter. Second time the session losses the session attribute.
Please provide some pointer.
First Request is as below:
HttpSession objSession = request.getSession(true);
objSession.setAttribute("wasRequestURL", completeURL);
Second request is as below:
if (null != objSession.getAttribute("wasRequestURL") &&
!"".equals(objSession.getAttribute("wasRequestURL").toString().trim())) {
requestedURL = objSession.getAttribute("wasRequestURL").toString();
logger.info("The session value for wasRequestURL is :::"+requestedURL);
}