![]() |
![]() |
||||
At line 13 changed 1 line. |
To create a Session Attribute Listener, create a class which implements the [HttpSessionAttributeListener|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionAttributeListener.html] interface. |
To create a Session Attribute Listener, create a class which implements the [HttpSessionAttributeListener|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSessionAttributeListener.html] interface. |
At line 27 changed 1 line. |
This method is called whenever a new session attribute is added with [HttpSession.setAttribute()|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html#setAttribute(java.lang.String,%20java.lang.Object)]. |
This method is called whenever a new session attribute is added with [HttpSession.setAttribute()|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSession.html#setAttribute(java.lang.String,%20java.lang.Object)]. |
At line 33 changed 1 line. |
This method is called whenever a session attribute is removed with [HttpSession.removeAttribute()|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html#removeAttribute(java.lang.String)]. |
This method is called whenever a session attribute is removed with [HttpSession.removeAttribute()|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSession.html#removeAttribute(java.lang.String)]. |
At line 37 changed 1 line. |
This method is called whenever an existing session attribute is replaced with a new value, using [HttpSession.setAttribute()|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html#setAttribute(java.lang.String,%20java.lang.Object)]. |
This method is called whenever an existing session attribute is replaced with a new value, using [HttpSession.setAttribute()|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSession.html#setAttribute(java.lang.String,%20java.lang.Object)]. |
At line 39 changed 1 line. |
![HttpSession|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.htm] |
![HttpSession|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSession.htm] |
At line 41 changed 1 line. |
The session is passed to both of the above methods in the [HttpSessionBindingEvent|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionBindingEvent.html] object. |
The session is passed to both of the above methods in the [HttpSessionBindingEvent|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSessionBindingEvent.html] object. |
At line 51 changed 1 line. |
The name and value of the changed attribute are passed in the [HttpSessionBindingEvent|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionBindingEvent.html] object. |
The name and value of the changed attribute are passed in the [HttpSessionBindingEvent|http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpSessionBindingEvent.html] object. |
At line 113 changed 1 line. |
This is some output from a real application that uses the above code. The session shows as DeltaSessionFacade because this application is clustered using Tomcat clustering. The logs below were used to detect a problem with session replication, and verify that session attributes were really being replicated across to the other members of the cluster. |
This is some output from a real application that uses the above code. The session shows as DeltaSessionFacade because this application is clustered using [Tomcat] clustering (see the <[distributable|web.xml.Distributable]> tag). The logs below were used to detect a problem with session replication, and verify that session attributes were really being replicated across to the other members of the cluster. |