SAS 9.1.3 Integration Technologies » SAS Web Infrastructure Kit: Developer's Guide


Developing Custom Portlets
Development Steps
Creating a Deployment Descriptor
Creating Display Resources Files
Developing the Presentation JSP Page
Creating Action Classes
Implementing Portlet Help
Creating a PAR File
Use Cases
Simple Display Portlet
Localized Portlet
Portlet Template (Editable Portlet)
Remote Portlet
Tips and Best Practices
Using the Portlet API
Sample Portlets
Localized Display Portlet (Welcome)
Interactive Form Portlet (FormExample)
Portlet Template, or Editable Portlet (DisplayURL)
Web Application (HelloUserWikExample)
Remote Portlet (HelloUserRemote
Portlet
Development Steps: Creating a Deployment Descriptor

Example Deployment Descriptor for a Local Portlet

A local portlet is a portlet that meets the following criteria:

  • The portlet is deployed within the portal Web application.

  • The portlet executes inside the portlet container.

  • The portlet consumes the computing resources (for example, CPU, memory, and disk storage) of the server machine on which the portal container runs.

  • The portlet can include resources such as Web pages, style sheets, images, resource bundles, and Java classes which are deployed inside the portal Web application.

An example of a portlet deployment descriptor for a local portlet follows. You can use this example as a template for creating portlet deployment descriptors for your own local portlets. Simply replace the element values with your own values as appropriate.


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE portlets SYSTEM "http://www.sas.com/idp/portlet.dtd">
<portlets>
  <local-portlet name="simplejsp" title="SimpleJspPortlet"
    icon="images/ndd.jpg">
    <localized-resources locales="en" />
    <deployment scope="user" autoDeploy="true"
      userCanCreateMore="false">
    </deployment>
    <initializer-type>
      com.sas.portal.portlets.JspPortlet.JspPortletInitializer
    </initializer-type>
    <init-param>
      <param-name>display-page</param-name>
      <param-value>simpleJspTest.jsp</param-value>
    </init-param>
    <portlet-path>/sas/portlets</portlet-path>
    <portlet-actions>
      <portlet-action name="display" default="true">
        <type>com.sas.portal.portlets.JspPortlet.JspPortlet</type>
      </portlet-action>
    </portlet-actions>
  </local-portlet>
</portlets>