concept ResourceServingPortlet interface in category java

appears as: ResourceServingPortlet interfaces, ResourceServingPortlet interface, The ResourceServingPortlet interface
Portlets in Action

This is an excerpt from Manning's book Portlets in Action.

Figure 2.9. The GenericPortlet abstract class implements the Portlet, EventPortlet, and ResourceServingPortlet interfaces. It provides default implementations of the Portlet interface’s render method, and it dispatches render requests to the doView, doHelp, and doEdit methods, depending upon the portlet’s mode.

Downloading binary content isn’t related to the concept of Ajax, but it’s covered in this chapter because the ResourceServingPortlet interface’s serveResource method isn’t only responsible for handling Ajax requests, but also for serving binary content.

12.4.1. Serving resources using the ResourceServingPortlet interface

<ResourceServingPortlet is a lifecycle interface that your portlet must implement if it needs to serve binary content or use Ajax to create a highly interactive user interface. If your portlet implements the ResourceServingPortlet interface, then your portlets don’t need to use a servlet to serve binary content or handle Ajax requests. Because the portlet itself handles Ajax requests, they are secured by the portal’s security infrastructure.