Differences between revisions 6 and 7
Revision 6 as of 2005-05-26 13:09:40
Size: 2041
Editor: ScottWeaver
Comment:
Revision 7 as of 2009-09-20 23:46:25
Size: 2041
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

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.

Deployment

Quick steps to deploying your portlet.

  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 ${portlet.application.id}::${portlet.name} where ${portlet.application.id} is either the id in <portlet-app id="appid" > or, if that is not present, the actual name of the war file that contains your portlet app and ${portlet.name} 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!

Redeployment

Just copy a newer version of the same war to WEB-INF/deploy, Jetspeed will take care of the rest. Redeployment preserves all portlet preferences.

Undeployment

To undeploy you portlet application, follow the same steps you would to undeploy a web application from your app server. A listener will notify Jetspeed to remove the portlet application from its internal registry.

NOTE:

You can use the Portlet Application Lifecycle Manager (PALM) in the administration portion of Jetspeed to undeploy, stop and restart portlet applications.

Jetspeed2/DeployingCustomPortlets (last edited 2009-09-20 23:46:25 by localhost)