Packaging, deploying and compiling cooperative portlets

When packaging, deploying, and compiling cooperative portlets, refer to these considerations on aspects of the process such as creating deployment descriptors and packaging the WAR file.


Create the deployment descriptors

A WAR must have a web.xml and a portlet.xml file in order to comply with J2EE specifications. For standard portlets only, web.xml only needs to contain servlet information, not portlet information. If the standard portlet does not contain servlets, web.xml must still be present, though the content of the file will be empty. However, in an IBM portlet web.xml must contain both servlet and portlet information. The web.xml and portlet.xml files must be modified to enable portlet cooperation. You must modify web.xml to refer to the property broker classes. For IBM only, the servlet class entry should specify the com.ibm.wps.pb.wrapper.PortletWrapper class in the property broker.

The portlet.xml file must specify the location of the WSDL file associated with each portlet. To achieve this, modify portlet.xml to add a configuration parameter to each concrete portlet that exposes actions to the property broker through the WSDL file. For the IBM example portlet.xml file below, the configuration parameter, c2a-action-descriptor, must specify a URL that points to the WSDL file that declares actions. The configuration parameter, c2a-nls-file, must specify the base name of an NLS resource file containing the translated text corresponding to the captions and descriptions of actions and properties. This file may be packaged in the same WAR file, so a relative path may be used.


WAR file considerations

Once the code and deployment changes have been made for using the property broker, additional libraries and files must be packaged along with the application. After you package the WAR file, it is ready to be installed. Use the following table to package the files in the correct location.

Portlet type IBM portlet only Standard and IBM
File name pbportlet.jar The version of pbportlet.jar must match the version of the product being used. WSDL file
Path /WEB-INF/lib relative to the root of the WAR file or an absolute URL
Original location $PORTAL_HOME/base/wp.propertybroker.legacy.impl/pb/lib


Additional considerations for compiling

If you are using own development environment, make sure to add the wp.propertybroker.standard.api.jar (for standard portlets) or wp.propertybroker.legacy.api.jar (for IBM portlets) file to class path. These JAR files can be found in the $PORTAL_HOME/base/wp.propertybroker.standard.api/shared/app and the $PORTAL_HOME/base/wp.propertybroker.legacy.api/shared/app directories, respectively. For other JAR file requirements, see Create a simple portlet.


Parent

Cooperative portlets
Cooperative portlets overview
Cooperative portlet programming model
WSDL reference for cooperative portlets

 


+

Search Tips   |   Advanced Search