The http session loses the attribute after request.sendRedirect
<p>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.</p>

<p>Please provide some pointer.</p>

<p>First Request is as below:</p>

<pre><code>HttpSession objSession = request.getSession(true);
objSession.setAttribute("wasRequestURL", completeURL);
</code></pre>

<p>Second request is as below:</p>

<pre><code>if (null != objSession.getAttribute("wasRequestURL") &amp;&amp; 
    !"".equals(objSession.getAttribute("wasRequestURL").toString().trim())) {

    requestedURL = objSession.getAttribute("wasRequestURL").toString();

    logger.info("The session value for wasRequestURL is :::"+requestedURL);
}
</code></pre>
