The JSR-286 introduced a new URL type—Resource URLs. Resource URLs trigger the
serveResource life cycle method on the
ResourceServingPortlet interface that you can leverage to create dynamic resources directly in the portlet. In this section, we're going to address how resource URL links can be created, and how the portlet is called to serve the resource.
A portlet may need to create URLs that reference the portlet itself. For example, when a user acts on a URL that references the portlet (by clicking a link or submitting a form) the result is a new client request to the portal targeted at the portlet. These URLs are called Portlet URLs. The Portlet API defines the
PortletURL and the
ResourceURL interfaces. ...