Portlet 3.0 API Opt In

A portlet must specify version 3.0 to “opt in” to the Portlet 3.0 API. The 3.0 Portlet API version can be specified in the following ways.

Standard Portlet @PortletApplication Annotation

Standard portlets need only specify the @PortletApplication annotation.

@PortletApplication(version="3.0") // 3.0 is the default for this annotation attribute
public class MyPortlet {

Liferay MVC Portlet @Component Annotation

Declarative Services portlets, such as MVCPortlet, can specify version 3.0 in their @Component annotation.

@Component(properties="javax.portlet.version=3.0", service=javax.portlet.Portlet.class)
public class MyDeclarativeServicesPortlet {

portlet.xml Descriptor

All portlets can specify version 3.0 in their portlet.xml descriptor.

<?xml version="1.0"?>

<portlet-app xmlns=""
« Meaningful Schema VersioningPortlet Descriptor to OSGi Service Property Map »
Was this article helpful?
0 out of 1 found this helpful