Tutorial:

Portlet 2.0 API Development with WebSphere Portal 8 and Rational 8.5

TheServerSide.com

TheServerSide has been running a series of written tutorials that examine and explain the key concepts involved in portlet 2.0 development. Of course, even the best written tutorials can be a little dry, so to complement these articles, TheServerSide is also providing a corresponding set of screencasts that will show how each of these portlets and portlet applications would be built if a software developer were to be using Rational Application Developer 8.5 and deploying to WebSphere Portal 8.

The following video complements the introductory tutorial in which a simple HelloWorldPortlet is developed and deployed.

The code itself is not particularly overwhelming. There is simply a doView method that generates a little "HelloWorld" message on the portal page:

package com.mcnz.portlet;

import java.io.*;
import javax.portlet.*;

public class HelloWorldPortlet extends GenericPortlet {
 public void  doView(RenderRequest request, RenderResponse response)
              throws PortletException, IOException {
      response.setContentType("text/html");
      response.getWriter().print("Hello World");
 }
}

Of course, the tutorial goes far beyond just coding a simple HelloWorld portlet. In the video, important concepts about the structure of a portlet application, important artifacts like the portlet deployment descriptor and the Web.xml file, and information on how to set up a WebSphere Portal test environment from within the Rational Application Developer environment are all explored. If you're interested in learning and mastering portlet development, this is definitely the right place to start.

30 May 2013

Related Content

Related Resources