Jetspeed-2 Deployment Overview

Deploying Portlets in Jetspeed-2: An End User View

Deploying custom portlets in Jetspeed-2 is simple. Portlets are very similar to servlets. They require a deployment descriptor, portlet.xml which goes in WEB-INF and need to be packaged in a war-like format. You can find quite a few example portlet.xml files within the Jetspeed-2 source tree. For starters take a look at the one under /portal/src/webapp/WEB-INF. In order to deploy a portlet, Jetspeed-2 requires the user to follow those steps:

  1. Build you portlet as a portlet application just as you would a web application.
  2. Package your portlet application into a .war file.
  3. Copy the .war file to Jetspeed's deployment directory, by default this is WEB-INF/deploy. Jetspeed will take care of automatically deplying the portlet into the portlet registry and will also deploy the portlet as a web application into the app server Jetspeed is deployed to.
  4. The easiest way to view your portlet is to add an entry to the default-page.psml under jetspeed/WEB-INF/pages. The id for the portlet fragment uses a unique combination of ${}::${} where ${} is the actual name of the war file (minus the ".war") that contains your portlet app and ${} needs to be the value in the portlet name tags, <portlet-name>MyPortlet</portlet-name>. Changes to the psml will be picked up automatically and you should now be able to view your portlet!

Portlet Deployment: How Does it Work?

The component hierarchy below describes the assembly dependencies supporting Jetspeed-2 deployment functionality.

The DeploymentManager is configured with the properties specified in WEB-INF/conf/

  • autodeployment.staging.dir: The directory scanned for autodeployment.
  • autodeployment.delay: The frequency of the deploy directory scanning.
The DeploymentManager is also configured with 2 types of DeploymentEventListener:

  • The DeployPortletAppEventListener handles the hot deployment of portlet applications.
  • The DeployDecoratorEventListener: handles the hot deployment of decorators. See guide to decorators for more information.

Jetspeed-2 provides a StandardDeploymentManager. The StandardDeploymentManager leverages a FileSystemScanner to scan for new assets to deploy. It leverages Jetspeed-2 deploy tools to prepare portlet applications prior to deployment.