Saturday, March 26, 2011

Can Portlets and Servlets communicate with in the same portal application?

Portlets can leverage servlets, JSPs and JSP tag-libraries for generating content.

A portlet can call servlets and JSPs just like a servlet can invoke other servlets and JSPs using a request dispatcher

When a servlet or JSP is called from within a portlet, the servlet request given to the servlet or JSP is based on the portlet request and the servlet response given to the servlet or JSP is based on the portlet response.

For example, by default:
Attributes set in the portlet request are available in the included servlet request

• The portlet and the included servlet or JSP share the same output stream Dispatching Requests to Servlets and JSPs Chapter).

• Attributes set in the portlet session are accessible from the servlet session and vice versa

No comments:

Post a Comment