O'Reilly logo

IBM Rational Application Developer V6 Portlet Application Development and Portal Tools by Ryan Wilson, Gianfranco Rutigliano, George Kroner, Belen Gonzalez, Karla Galvan, Cristiano Cesario, Juan R. Rodriguez

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

19.2. Accessing portlet services

Because of the inherit differences in the two portlet APIs, accessing portlet services in each API is different

19.2.1. Accessing a portlet service in an IBM portlet

The IBM portlet API is tightly coupled with WebSphere Portal. The IBM portlet API has direct access to certain features that the JSR 168 API does not. To access a service in an IBM portlet you need to use the getService method on the PortletContext. Example 19-10 shows an example of accessing the MailService from an IBM portlet.

Example 19-10. Accessing MailService in an IBM portlet
IBMMailService mailService =
(IBMMailService)getPortletConfig().getContext().getService(IBMMailService.class
);

19.2.2. Accessing a portlet service in a JSR 168 portlet ...

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