Portlet Development Workbook

Learn the Java Standard Portlet API (JSR 168) at your own pace

Learn portlet development at your own pace, and you get a firm foundation in the Java Standard Portlet API (JSR 168) including the "what", "why", and "how".

Tim Hanis (hanistt@us.ibm.com), WebSphere Portal Development, EMC

Photo of Tim HanisTim Hanis is a senior software engineer at IBM Research Triangle Park lab in NC. He has extensive experience with WebSphere Portal having worked in both development and in the consulting services organization.

developerWorks Contributing author

30 August 2006

This hands-on workbook guides you through learning how to develop portlets using the Java™ Standard Portlet API (JSR 168). In addition to getting practice using the basic API, you learn about the issues and challenges associated with portlet development. With this foundation, you can see how the frameworks can help you.

You learn the concepts of portlet development by developing a working example. Along the way, you learn what you are doing and why so that you can truly gain an understanding of what is being accomplished and why certain approaches and decisions were chosen. Portlet code is provided for each chapter so that, if you do get stuck, you can refer to the solution for that topic area. So, immerse yourself in portlet development, and work at your own pace.

In this article

  • Create a portlet that uses a combination of modes (view, edit, configure).
  • Enable multiple page "views" per mode to learn about portlet page navigation
  • Enable the portlet to provide standard CRUD (create, read, update, delete) on some data
  • Persist the data someplace (like a database)
  • Use IBM Rational® Application Developer to create a portlet
  • Use the interactive Application Developer test environment to test and debug the portlet
  • Export the portlet so it can be deployed in a stand-alone portal environment

About the example scenario

The exercise is to create three portlet applications that manage a list of contacts (similar to an address book). Each contact list is specific to a single portal user. A main view shows the user's list of contacts in order by name. When the user selects a name, the view shows the details for that person (phone number, email address, and so on). The edit mode for the portlet lets the user add, update, and delete entries in the contact list. Finally, the configure mode sets up the appropriate database information in which to store the contacts lists.


Article in PDF format0608_hanis-PortletWorkbook.pdf1.2 MB
Code sampleportletwb-samples.zip192 KB
SummaryTitle=Portlet Development Workbook