3.1.1.1. The simplest portlet

3.1.1.1.1. Portlet class
3.1.1.1.2. Application descriptors

Source code of the SimplestHelloWorld portlet that is discussed here can be found at github.

Like other Java EE applications, GateIn 3.5 portlets are packaged in the .war files. A typical portlet .war file can include servlets, resource bundles, images, HTML, JavaServer Pages (JSP), and other static or dynamic files.

The following is the directory structure of the SimplestHelloWorld portlet:

|-- SimplestHelloWorld-0.0.1.war
|   `-- WEB-INF
|       |-- classes
|       |   `-- org
|       |       `-- gatein
|       |           `-- portal
|       |               `-- examples
|       |                   `-- portlets
(1)|       |                       `-- SimplestHelloWorldPortlet.class
(2)|       |-- portlet.xml
(3)|       `-- web.xml

1

The compiled Java class implementing javax.portlet.Portlet (through javax.portlet.GenericPortlet ).

2

This is the mandatory descriptor file for portlets. It is used during deployment.

3

This is the mandatory descriptor for web applications.

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