+

Search Tips   |   Advanced Search

Portlets


Portlets are reusable Web modules that provide access to Web-based content, applications, and other resources. Portlets can run on WAS because it has an embedded JSR 286 Portlet container. The JSR 286 API provides backwards compatibility. We can assemble portlets into a larger portal page, with multiple instances of the same portlet displaying different data for each user.

From a user's perspective, a portlet is a window on a portal site that provides a specific service or information, for example, a calendar or news feed. From an application development perspective, portlets are pluggable Web modules that are designed to run inside a portlet container of any portal framework. We can either create our own portlets or select portlets from a catalog of third-party portlets.

Each portlet on the page is responsible for providing its output in the form of markup fragments to be integrated into the portal page. The portal is responsible for providing the markup surrounding each portlet. In HTML, for example, the portal can provide markup that gives each portlet a title bar with minimize, maximize, help, and edit icons.

We can also include portlets as fragments into servlets or Java Server Pages files. This provides better communication between portlets and the Java EE Web technologies provided by the appserver.

If we use Rational Application Developer version 6 (RAD) to create the portlets, remove the following reference to the std-portlet.tld from web.xml to run the portlets outside of RAD:

<taglib id="PortletTLD">
  <taglib-uri>http://java.sun.com/portlet</taglib-uri>
  <taglib-location>/WEB-INF/tld/std-portlet.tld</taglib-location>
</taglib>
Also if we use RAD version 6 to create portlets, note that portlets created by using the Struts Portlet Framework are not supported on WAS.

 

Portlet applications

If the portlet application is a valid Web app written to the Java Portlet API, the portlet application can operate on both the Portal Server and the WAS without requiring any changes. JSR 168 and JSR 286 compliant portlet applications must not use extended services provided by WebSphere Portal to operate on the WAS.



Related concepts


Portlet container
Portlet URL security

 

Related tasks


Task overview: Managing portlets
Set portlet fragment caching

 

Related


Portlet container settings