Class SimplePortletHandlerAdapter

  • All Implemented Interfaces:
    Aware, PortletContextAware, HandlerAdapter

    public class SimplePortletHandlerAdapter
    extends Object
    implements HandlerAdapter, PortletContextAware
    Adapter to use the Portlet interface with the generic DispatcherPortlet. Calls the Portlet's render and processAction methods to handle a request.

    This adapter is not activated by default; it needs to be defined as a bean in the DispatcherPortlet context. It will automatically apply to mapped handler beans that implement the Portlet interface then.

    Note that Portlet instances defined as bean will not receive initialization and destruction callbacks, unless a special post-processor such as SimplePortletPostProcessor is defined in the DispatcherPortlet context.

    Alternatively, consider wrapping a Portlet with Spring's PortletWrappingController. This is particularly appropriate for existing Portlet classes, allowing to specify Portlet initialization parameters, etc.

    Since:
    2.0
    Author:
    John A. Lewis
    See Also:
    Portlet, SimplePortletPostProcessor, PortletWrappingController