|
Sample: Remote Portlet (HelloUserRemotePortlet)
Step 2: Create the Portlet Deployment Descriptor
The portlet deployment descriptor is an XML file that provides all of the information that the portal Web application needs to deploy one or more portlets. Here is the portlet deployment descriptor for the HelloUserRemotePortlet. The boxes contain explanatory comments. For more information, see Creating a Portlet Deployment Descriptor.
<?xml version="1.0" encoding="UTF-8"?>
The DOCTYPE statement must be present
in the descriptor file in order for the portlet to run.
However, the document type definition (DTD) does not
need to be accessible at the URL that the statement
specifies.
If you want to look at the portlet.dtd file, you can
find it in the portal setup directory in the path Portal\WEB-INF .
For example, if you used the default installation location
on a Windows system, then the DTD is located under the
following path: c:\Program Files\SAS\Web\Portal2.0.1\Portal\WEB-INF .
|
<!DOCTYPE portlets SYSTEM "http://www.sas.com/idp/portlet.dtd">
<portlets>
The remote-portlet element assigns the name HelloUserRemotePortlet to the portlet. The name cannot contain spaces. The portlet identifier, which consists of the portlet path (defined in the portlet-path element) together with the portlet name, must be unique within the portal Web application.
The "true" setting for the passContextId attribute makes the portal Web application session information, including user identity, available to the remote portlet.
|
<remote-portlet name="HelloUserRemotePortlet"
title="HelloUserRemotePortlet" passContextId="true">
<localized-resources locales="en" />
<deployment scope="user" autoDeploy="true"
userCanCreateMore="false" />
<portlet-path>/sas/portlets/remote</portlet-path>
<portlet-actions>
The URL for the remote portlet's Web application, called HelloUserWikExample, is specified in the url subelement of the portlet-action element. This subelement must contain a fully qualified URL, including a fully qualified host domain name.
For details about the Web application, see Sample Web Application (HelloUserWikExample).
|
<portlet-action name="display" default="true">
<url>
http://d9999.mycompany.com:8080/HelloUserWikExample/jsp/app.jsp
</url>
</portlet-action>
</portlet-actions>
</remote-portlet>
</portlets>
|