// Here we will see if this request hits the garbage collection
lottery by hitting // the odds needed to perform garbage collection on
any given request. If we do // hit it, we'll call this handler to let
it delete all the expired sessions.
在JavaWeb中,session表示客户端发起的一次会话被服务器接受后,服务器分配的一个内置对象,通过session设置的属性在本次会话中的所有页面都可以得到值,而不管哪一方进行了页面的跳转。所以session对于一个浏览器发起的本次会话中都是有效的(浏览器窗口一直存在)。如果用户重新启动浏览器访问,则服务器会重新分配session,因为是新的session值,当然不会保存上一次的值(因为对象都是不同的)。所以给用户的感觉就是-----上次的session失效了.