This topic provides a brief overview of the IBM portlet API. This API is not recommended, and this topic provides support for portlets that have not yet migrated to the standard Portlet APIs.
Therefore, the portlet is a special type of servlet. The properties of this type of servlet make it easy to insert and run in the Portal server. Unlike the servlet, portlets cannot send redirects or errors directly to the browser, forward requests, or write arbitrary tags to the output stream. The Portlet container relies on the Java EE architecture implemented by WebSphere application Server. As a result, portlets are encapsulated in a way that is similar to the Java WEB application and deployed in a servlet-like manner.
In summary, portlets can be managed more dynamically than the servlet. You can apply the following updates without starting and restarting the Portal server: You can use the portal Site Administration user interface to install and remove portlet applications consisting of several portlets. The settings for a portlet can be changed by an administrator with appropriate access to dynamically create and delete portlets using the administration portlet. For example, once an administrator creates a new cut, the clipping portlet can be used to create a new portlet instance.
The Portlet container relies on the Java EE architecture implemented by WebSphere application Server. As a result, the portlets are encapsulated in the WAR file in a way similar to the Java EE WEB application and deployed in a servlet-like manner. Like other servlet, you use the servlet deployment Descriptor (Web.xml) to define the Portlet to the application server. This file defines the Portlet's class file and read-only initialization parameters.
The following figure shows the portlets after the WAR file was deployed. For each portlet deployed on the portal server, it creates a servlet or Portlet class instance on the application server.
Initialization parameters are set by the Portlet developer and can be read by the portlet using the Portletconfig object. The servlet deployment descriptor can contain multiple Web applications, each of which is defined by the <servlet> element. In addition, each servlet definition can point to the same Portlet class file, so that different initialization parameters can be used for each instance of the Portlet class to create different Portletconfig objects. For more information, see the WEB application Deployment descriptor.