11.2. RequestDispatcher

JSR 168 portlets use the PortletRequestDispatcher to delegate responsibility to servlets and JSPs. The PortletRequestDispatcher can only be used while the portlet is processing a render action. Th e request dispatcher is obtained from the portlet context by using either the getRequestDispatcher or the getNamedDispatcher method.

11.2.1. PortletContext.getRequestDispatcher

The getRequestDispatcher method takes a String representing the context root relative path of the included file. This path must begin with a ‘/’. This method will return null if the path is not found.

While using the getRequestDispatcher method, you may include parameters in the path. For example, if your path is /mypath/myjsp.jsp, you can include parameters ...

Get IBM Rational Application Developer V6 Portlet Application Development and Portal Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.