|
WebLogic Server 7.0 Code Examples, BEA Systems, Inc. | |||||
See:
Description
| Class Summary | |
| LifeCycleListener | LifeCycleListener is a servlet listener class that implements the javax.servlet.ServletContextListener interface. |
| SessionAttributeListener | SessionAttribueListener is a servlet listener class that implements the javax.Servlet.http.HttpSessionAttributeListener interface. |
| SessionListener | SessionListener is a servlet listener class that implements the javax.Servlet.http.HttpSessionListener interface. |
This example demonstrates how to write Servlet LifeCycle Listeners.
The lifeCycleWebApp is an example of an administrative utility that can be used to list all the Active sessions in a WebApplication and list session related information such as the creationTime, the lastAccessedTime etc. This demonstrates the application lifecycle event listening features introduced in the Servlet 2.3 specification.
See:
Description
| Additional Resources for examples.servlets.lifecycle | |
| build.xml | The Ant build script that assembles and deploys the application. |
| index.html | Welcome page for the lifeCycle Web Application. |
| Invalidate.jsp | This Java Server Page removes invalid sessions from the session list. It should only be called from List.jsp. |
| List.jsp | This Java Server Page lists all the active sessions, and has a link to invalidate each session. |
| Session.jsp | This Java Server Page is used for testing the Web Application by adding attributes to the session. |
| web.xml | Web Application deployment descriptor. This descriptor configures the listeners the webapp uses and a welcome file for the application. |
The Web Application lifeCycleWebApp Is an example of using Servlet Context and Http Session Listeners in your web applications. In this example, the listeners just log to standard out messages about what is happening to the application, but you could execute any code in these listening methods.
Perform the following steps in order to build and run the example:
prompt> ant
http://hostname:port/lifeCycleWebAppwhere:
|
Documentation is available at http://e-docs.bea.com/wls/docs70 |
|||||