-
Session Tracking
- Stateless nature of HTTP
- Session tracking
-
Techniques
-
URL Rewriting
- URL (Uniform Resource Locator)
-
Hidden Form Field
- request.getParameter()
-
Cookies
- name-value pair
- javax.servlet.http.Cookie
-
Methods
- getMaxAge()
- getValue()
- getPath()
- getName()
- setMaxAge()
- setValue()
- setpath()
-
Sending Cookies
- response.addCookie()
-
HttpSession
-
Methods
- getAttribute()
- getId()
- getMaxInactiveInterval()
- getServletContext()
- invalidate()
- isNew()
- setAttribute()
- removeAttribute()
- setMaxInactiveInterval()
- Invalidate a Session
-
Session Timeout
- <session-config> > <session-timeout>
-
Event Handling
-
HttpSessionAttributeListener
-
Methods
- attributeAdded()
- attributeRemoved()
- attributeReplaced()
-
HttpSessionBindingListener
-
Methods
- valueBound()
- valueUnbound()
-
HttpSessionBindingEvent
- getName()
- getSession()
- getValue()
-
HttpSessionListener
- sessionCreated()
- sessionDestroyed()