4.1 WebSphere session manager

 < Day Day Up > 



4.1 WebSphere session manager

The session manager is part of each Web container, and is responsible for managing HTTP sessions, providing storage for session data, allocating session IDs, and tracking the session ID associated with each client request through the use cookies, URL rewriting, or SSL session identifier techniques. The session manager allows the WebSphere Application Server administrator to dynamically configure and tune the behavior of all HTTP sessions created by servlets within its application server.

From an application development perspective, servlet and JSP code do not interact directly with the session manager object. Rather, the session manager supports the HTTPSession interface, which developers use for session functionality.

All the servlet or JSP developer has to do is create the session and put and get data. This allows the application developer to focus on business logic, and ensures consistent behavior across all of the servlets called by its servlet engine.

4.1.1 HttpSession interface

The Java servlet specification contains the interface javax.servlet.http.HttpSession, which the WebSphere Application Server servlet engine (Web container) supports. HttpSession provides Application Program Interfaces (APIs) that handle many of the details of session access and management.

An HttpSession gets created by calling the javax.servlet.http.HttpServletRequest.getSession() method on the servlet's request object. If a session does not yet exist, this call creates one.

Some of these APIs have been deprecated with the Java Servlet Specification 2.2. The putValue() and getValue() methods, for example, have been replaced by putAttribute() and getAttribute(), respectively, although the Java Servlet Specification 2.1 methods are still supported.



 < Day Day Up > 



DB2 UDB V8 and WebSphere V5. Performance Tuning and Operations Guide2004
DB2 UDB V8 and WebSphere V5. Performance Tuning and Operations Guide2004
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 90

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net