|
Sample: Remote Portlet (HelloUserRemotePortlet)
Step 1: Create the Directory Structure
The following directory structure was used to create the portlet called HelloUserRemotePortlet.
This structure includes the following directories and subdirectories:
Directory |
Contents |
portlet_work (root)
This directory serves as a development area for the portlet. |
Portlet deployment descriptor file portlet.xml
The name of the deployment descriptor file must be portlet.xml .
|
/HelloUserRemotePortlet
|
This is the main portlet directory. It does not contain any files. The directory name must not have any spaces, and it must match the name of the portlet as specified in the name attribute of the <remote-portlet> element in portlet.xml .
|
/HelloUserRemotePortlet /classes |
The display resources file called portletDisplayResources.properties .
|
The following rules apply when you set up the directory structure:
Neither portlet names nor their paths can contain spaces.
The portlet identifier (which consists of the name and the path) must be unique.
Note: Developers should devise a convention to ensure unique name-spaces, similar to the conventions used for naming Java packages. For example, the Sales division of a company named ABCD could create portlets in the path ABCD/Sales , and the Purchasing division could create portlets in the path ABCD/Purchasing . Then both Sales and Purchasing could have different portlets named HelloUserRemotePortlet .
Note: You must create a separate directory structure for the Web application that is called by the remote portlet, as described in the Sample Web Application (HelloUserWikExample).
|