title: How to prevent session attributes from persisting on the server?
body: <p>I'm new to java web development. I have created a <code>servlet/jsp</code> web application that is deployed on <code>Tomcat 7</code>. After authentication, the user go through few page that has its own forms. The inputs are stored as session attributes and are displayed on a confirmation before log out.</p>
  
  <p>For the log out, I used <code>session.invalidate() and sendRedirect("Logout.jsp")</code>. </p>
  
  <p>If I run the application again, it will return my new input, but it will also copy all the old session input.</p>
  
  <p>I have disabled the session persistence and put the context <code>cachingAllowed="false"</code>. </p>
  
  <p>It seems that all the session attributes are stored in the server memory. Is this problem causes by the server configuration? </p>