Showing posts with label Listeners. Show all posts
Showing posts with label Listeners. Show all posts

Friday, 31 May 2013

Applying Listeners to JSR Compliant Portlets

As per the JSR 286 Specification the following Listeners, which work with Servlet Requests, can be applied to requests targeted towards Portlets.
  • ServletContextListener 
  • ServletContextAttributeListener
  • HttpSessionActivationListener
  • HttpSessionAttributeListener
  • HttpSessionBindingListener
  • ServletRequestListener.

For this to work the Container needs to set a variable javax.portlet.lifecycle_phase.

Lets see an example.