Deploying a portlet
In this exercise you'll deploy a simple Hello World portlet to uPortal.
The Hello World portlet used here is from Cris Holdorph's short article "Tutorial on Portlet Development".
Step 1: Copy the Hello.war someplace convenient
Copy the Hello.war portlet archive to /up31seminar for convenience.
Step 2: Execute the deployPortletApp command line tool
cd /up31seminar/uPortal-3.1.0-M2-quick-start/uPortal-3.1.0-M2 ../ant.sh deployPortletApp -DportletApp=/up31seminar/Hello.war
Step 3: Start uPortal
cd /up31seminar/uPortal-3.1.0-M2-quick-start ./ant.sh start
Step 4: Note the installed portlet code
uPortal's portlet deployment process translates from the JSR-168 portlet deployment descriptor language of portlet.xml to the Pluto portlet engine configuration in servlet.xml required to make portlets work. The resulting web application will have been deployed to
/up31seminar/uPortal-3.1.0-M2-quick-start/apache-tomcat-6.0.18/webapps/Hello
Step 5: Publish the portlet through the admin portlet publishing UI
Whereas the deployPortletApp command line tooling installing the portlet software itself, the channel publishing process provisions the portal with metadata about the portlet – where should users find it to subscribe to it, who is permitted to use it, etc.
Login to uPortal as admin
Click Portlet Manager across the top.
Click "Publish a new channel".
Choose "Portlet" as the channel type.
Channel title, name, functional name, and description can all be "Hello".
This is not a framework portlet, its Portlet Web Application Path should be
/Hello
and its Portlet Name should be
HelloPortlet
There are no portlet preferences.
Put the portlet in the "Development" category.
Make the portlet available to the "Everyone" group.
Click "Finished" to complete publishing the portlet.
Click "Back to home" at the top of the screen to escape portlet publishing.
Step 6: Subscribe to the portlet
Click "Add tab" to create a new tab in the layout.
Click "Add content" to add content to the tab.
In the "Development" category, find the "Hello" portlet, and add it to the layout.
Observe the Hello portlet. It's not much of a portlet, but these are the same steps you'd use to deploy other more interesting portlets.