Package javax.portlet
Portlet API Package description.
The javax.portlet package defines the API for portlets.A portlet is a Java technology based web component, managed by a portlet container, that processes requests and generates dynamic content. Portlets provide a presentation layer to Information Systems.
Portlets generate fragments of markup (e.g. HTML, XHTML, WML). A portal combines markup fragments generated by different portlets into a portal page.
A portlet container manages the lifecyle of portlets. It also provides the required runtime environment.
Portlets are bundled in Portlet Applications as web applications using the WAR file format. A portlet application consists of two deployment descriptors: one to specify the web application resources (web.xml) and one to specify the portlet resources (portlet.xml).
Click here for an example of a portlet resources deployment descriptor (portlet.xml).
-
Interface Summary Interface Description ActionRequest TheActionRequest
represents the request sent to the portlet to handle an action.ActionResponse TheActionResponse
interface represents the portlet response to an action request.PortalContext ThePortalContext
interface gives the portlet the ability to retrieve information about the portal calling this portlet.Portlet ThePortlet
interface is used by the portlet container to invoke the portlets.PortletConfig ThePortletConfig
interface provides the portlet with its configuration.PortletContext ThePortletContext
interface defines a portlet view of the portlet container.PortletPreferences ThePortletPreferences
interface allows the portlet to store configuration data.PortletRequest ThePortletRequest
defines the base interface to provide client request information to a portlet.PortletRequestDispatcher ThePortletRequestDispatcher
interface defines an object that receives requests from the client and sends them to the specified resources (such as a servlet, HTML file, or JSP file) on the server.PortletResponse ThePortletResponse
defines the base interface to assist a portlet in creating and sending a response to the client.PortletSession ThePortletSession
interface provides a way to identify a user across more than one request and to store transient information about that user.PortletURL ThePortletURL
interface represents a URL that reference the portlet itself.PreferencesValidator ThePreferencesValidator
allows to validate the set of preferences of the associated portlet just before they are stored in the persistent store.RenderRequest TheRenderRequest
represents the request sent to the portlet to handle a render.RenderResponse TheRenderResponse
defines an object to assist a portlet in sending a response to the portal. -
Class Summary Class Description GenericPortlet TheGenericPortlet
class provides a default implementation for thePortlet
interface.PortletMode ThePortletMode
class represents the possible modes that a portlet can assume.PortletSessionUtil ThePortletSessionUtil
class helps identify and decode attributes in thePORTLET_SCOPE
scope of the PortletSession when accessed through the HttpSession an from within calls to methods of the HttpSessionBindingListener interface.WindowState TheWindowState
class represents the possible window states that a portlet window can assume. -
Exception Summary Exception Description PortletException ThePortletException
class defines a general exception that a portlet can throw when it is unable to perform its operation successfully.PortletModeException ThePortletModeException
is thrown when a portlet tries to use or set a portlet mode that is not supported by the current runtime environment or the portlet.PortletSecurityException A portlet should throw aPortletSecurityException
when a call fails because of security reasons.
Additionally it can be thrown by the portal/portlet-container.ReadOnlyException TheReadOnlyException
is thrown when a portlet tries to change the value for a read-only preference attribute.UnavailableException The portlet should throw theUnavailableException
when the portlet is either temporarily or permanently unavailable to handle requests.UnmodifiableException TheUnmodifiableException
is thrown when a portlet tries to change the value for a preference attribute, marked as unmodifiable in the deployment descriptor with thenon-modifiable
tag, without the needed permissions.ValidatorException TheValidatorException
is thrown by thevalidate
method of a PreferencesValidator when the validation of a preference failed.WindowStateException TheWindowStateException
is thrown when a portlet tries to use a window state that is not supported by the current runtime environment or the portlet.