title: Struts2 remember me
body: <p>I'm using Struts 2 in my web application. My client is asking me to implement "Remember Me" feature, so that he doesn't have to login again. This is what I think should be done:</p>
  
  <ol>
  <li>I should create a cookie with some user-specific key and store the same in database on user login if "Remember me" option is checked.</li>
  <li>I should write an interceptor, that takes out cookies from the request, checks the key against the database and if found and not expired (7 days), it puts the corresponding user in session.</li>
  </ol>
  
  <p>Is there any other, more effective &amp; easy &amp; better, performance-wise method? </p>