Portlet 2.0 API Development with WebSphere Portal 8 and Rational 8.5

This portlet 2.0 API development tutorial examines how to create a simple HelloWorld portlet using WebSphere Portal and Rational Application Developer 8.5.

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.

This was last published in May 2013

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudApplications

SearchSOA

SearchSoftwareQuality

SearchFinancialApplications

SearchSAP

SearchManufacturingERP

Close