SAP NetWeaver AS Java includes a Web Container that enables the execution of Java servlets and JavaServer Pages (JSPs), as shown in the following graphic. As JSPs are translated into servlets, they follow the same principles as servlets.
Within a load-balanced Java cluster, all Java processes have the same J2EE components available. They are deployed in parallel and the cluster elements use the database as a central information store. This means that all servers in the cluster share the same information..
Therefore, it does not matter which server in a cluster is accessed to provide HTTP services. However, you need to distinguish whether stateless or stateful servlets are accessed:
? Stateless servlets have no application state that is bound to the session. Therefore, every server in the cluster can run stateless servlets. When a server fails, the next request for the servlet is directed to another server that handles the request without loss of session data.
? Stateful servlets have an application state that is bound to the session. For these servlets you can implement HTTP session failover so that session state is serialized and written to persistent storage (either the database or the file system). Therefore, if the server where the session was active fails, the session state can be retrieved on another server using the database. For more information about HTTP session failover, see Failover System and Failover for J2EE Web Applications.