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:
- 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.
- 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.
Is there any other, more effective & easy & better, performance-wise method?