O'Reilly logo

Liferay Portal 5.2 Systems Development by Jonas Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Serving resources

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.

Using Resource URL

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required