"stay logged in" login page
===

I want to implement a stay logged in or remember me in my jsp login page.  I am using container based form authentication. I think I need to I have to store users' data such as userid and token - a status information to determine whether as user is logged or not, into the cookies.
Also I heard that we should not store users' password even it is encrypted. 

If I store their password and userid, I can sigh them in automatically by submitting the data to servlet before I show the login page to users. 

If I do not store their password, what method could I use to sign them in automatically?