转载一篇关于JetSpeed2.0的文章:Jetspeed2/DevelopersDocumentation/DeployingCustomPortlets

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 the actual name of the war file (minus the ".war") 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值