3.1.2. Global portlet.xml file

Global portlet.xml usecase

The Portlet Specification introduces PortletFilter as a standard approach to extend the behaviors of portlet objects. For example, a filter can transform the content of portlet requests and portlet responses. According to the Portlet Specification, normally there are 3 steps in setting up a portlet filter:

  1. Implement a PortletFilter object.

  2. Define the filter in portlet application deployment descriptor.

  3. Define the filter mapping in portlet definitions.

Two first steps are quite simple and easy to be done, however, at the step 3, developers/administrators need to replicate the filter mapping in many portlet definitions that makes work erroneous and tedious in several usecases. The global portlet feature is designed to compensate such limitation.

Global metadata

The Global metadata is declared in the portlet.xml file conforming with Portlet 2.0 's XSD.

<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus