Top Description Methods
javax.portlet

public Interface ResourceServingPortlet

Known Direct Implementers
javax.portlet.GenericPortlet

The ResourceServingPortlet interface allows serving resources through the portlet.

The portlet container must call this method for links created by the RenderResponse.createResourceURL() call. If the portlet creates resource URLs with RenderResponse.createResourceURL() it must implement this lifecycle method.

Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
serveResource(ResourceRequest
the resource request
request
,
ResourceResponse
the resource response
response
)

Called by the portlet container to allow the portlet to generate the resource content based on its current state.

Method Detail

serveResourceback to summary
public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException

Called by the portlet container to allow the portlet to generate the resource content based on its current state. The portal / portlet container must not render any output in addition to the content returned by the portlet. The portal / portlet container should expect that the portlet may return binary content for a renderResource call.

Parameters
request:ResourceRequest

the resource request

response:ResourceResponse

the resource response

Exceptions
PortletException:
if the portlet has problems fulfilling the rendering request
IOException:
if the streaming causes an I/O problem
UnavailableException:
if the portlet is unavailable to perform render at this time
PortletSecurityException:
if the portlet cannot fulfill this request due to security reasons