GateIn 3.5 requires certain descriptors to be included in a portlet WAR file.
These descriptors are defined by the Java EE (
web.xml) and Portlet Specification (
Below is an example of the
This file must adhere to its definition in the JSR-286 Portlet Specification. More than one portlet can be defined in this file:
<title>Simplest Hello World Portlet</title>
Define the portlet name. It does not have to be the class name.
The Fully Qualified Name (FQN) of your portlet class must be declared here.
The <supports> element declares all of the markup types that a portlet supports in the render method. This is accomplished via the <mime-type> element, which is required for every portlet.
The declared MIME types must match the capability of the portlet. It allows administrators to pair which modes and window states are supported for each markup type.
This does not have to be declared as all portlets must support the view portlet mode.
Use the <mime-type> element to define which markup type is supported by the portlet. In the example above, this is text/html. This section tells the portal to only output HTML.
When rendered, the portlet's title is displayed as the header in the portlet window, unless it is overridden programmatically. In the example above, the title would be Simplest Hello World Portlet .