Thursday, January 24, 2008

Portlet Tutorial - Deploying your first portlet to OpenPortal Portlet Container 2.0

This post is a part of the Portlet 2.0 (JSR 286) Tutorial series


At the time of this writing, only Sun seems to have a functional JSR 286 portlet container. Apache Pluto 2.0 is work in progress and I have been unsuccessful in running the Exo Portlet Container.


The OpenPortal portlet container is Sun Microsystem's implementation of the JSR 286 spec. Here is how you would deploy the Hello World portlet to this container.

Step 1 :

Get JDK 5 or greater: http://java.sun.com/javase/downloads/index.jsp

Step 2 :

Get the Glassfish Application Server or Tomcat
If you downloaded Glassfish, set it up first.

Step 3 :

Download the latest stable release of the portlet container.

Step 4 :

Follow the install instructions: Installing the Portlet Container

Step 5:

Start your server and access the portlet container at http://localhost:8080/portletdriver

Step 6:

Once you have the portlet container running, you will notice two tabs. A Portlets tab and an Admin tab.The Portlets tab helps view all the portlets currently deployed. The Admin tab is used to to deploy/undeploy portlets. You are most likely to see a blank page. This is because no portlets are deployed by default.

Click on the Admin tab and proceed to deploy the portlet.


















Once you click on deploy, the portlet is automatically deployed and configured. Click on the Portlets tab to now view the portlet.












You have successfully run your first portlet !

3 comments:

Anonymous said...

Well, interesting. Have you ever tried Apache Geronimo instead of Glassfish or Tomcat ?

navaneeth said...

No. I haven't.

Xuphey said...

There is a nullpointer exception in Tomcat 6, but Tomcat 5 works fine with additional apache jstl implementation.