|
NOTE:
These slides have not been updated since 2003. They have been superseded by the book
Anders Møller and Michael Schwartzbach, February 2006 |
|
| INTERACTIVE WEB SERVICES WITH JAVA |
|
Events:
Implement the appropriate interface, register your listener (in web.xml).
Example listener and deployment declaration:
public class DataListener implements ServletContextAttributeListener
{
public void attributeReplaced(ServletContextAttributeEvent event)
{
if (event.getName().equals("some_data"))
updateSomeOtherData();
}
...
}
|
<listener> <listener-class>DataListener</listener-class> </listener> |
Useful for
|
| COPYRIGHT © 2002-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH |
|