Newsletter sign-up
View all newsletters

Sign up for our Enterprise Java Newsletter

Enterprise Java

The Portlet Packet: A quickstart guide to Portlet 2.0

Build your own lightweight pluggable portal applications

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Interested in building small bits of browser-based functionality for public or internal consumption? Portlets could be the answer. Portal Zone blogger Navaneeth Krishnan discusses the qualities that define a portlet application, then walks you through a short development example that will get you started with the new Portlet 2.0 spec. Level: Beginner

The Java Portlet API enables developers to create reusable Web components that can be deployed on a wide variety of Java-based portals, including WebSphere, Liferay, eXo, and JBoss Enterprise Portal. In this article, you'll explore the recently finalized Portlets 2.0 specification (JSR 286), with a quick hands-on exercise in getting your first portlet application up and running.

Inter-portlet communication

Building a portal application typically involves getting multiple portlets to communicate with one another. This tricky process is the topic of two other articles in the JavaWorld Portlet Packet:

Understanding portlets

A Web portal can be defined as a specialized Website that aggregates content and services from diverse sources and presents them in a single unified format to its users. The front pages of Yahoo and Google, which you can customize to present the information you're most interested in, are perfect examples of Web portals. Web portals are also commonly used within organizations, where they're known as corporate intranet portals. Typically, a Web portal is built using specialized software called a portal server.

The Portlet 2.0 specification, established by JSR-286, defines a standardized Web component called a portlet. In simple terms, a portlet is a piece of dynamic functionality that can be plugged into any compliant portal server. The portal server can run multiple portlets simultaneously to create a portal page. Figure 1 illustrates a simple portal page.

Screenshot of portlets running in a portal

Figure 1. Portlets running in a portal (click to enlarge)

The portal page aggregates output from multiple portlets, with each portlet's content being confined to its own section of the page, called a portlet window. The portal adds decorations and controls to those windows, which are used for the operations supported by the portal -- such as minimizing or maximizing the windows.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (1)
Login
Forgot your account info?

Really good one!!!By Anonymous on December 7, 2008, 11:17 pmReally good one!!!

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources

More from JavaWorld