Sounds like you're looking for long living Cookies to me.
You should take a look at ExternalContext.addResponseCookie()
to store your cookie and HttpServletRequest.getCookies()
to retrieve it.
Although it's not the same use case as yours I would like to refer you to this BalusC answer if you want grant your cookies a long life.