Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
PortletContext provides portlets with access to its environment, which includes the portlet application and the portlet container. Each portlet application has its own unique PortletContext; if you have portlets in different portlet applications, they don’t share attributes set in the PortletContext. You saw earlier that you can use PortletContext to obtain a PortletRequestDispatcher to generate portlet content by including or forwarding portlet requests to a JSP page using the PortletRequestDispatcher object’s getRequestDispatcher method. In this section, we’ll look at some of the important methods of the PortletContext interface.
Table 3.6 describes some of the important PortletContext methods.