File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Portals and Portlets and the fly likes Servlet communication with portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Servlet communication with portlet" Watch "Servlet communication with portlet" New topic

Servlet communication with portlet

Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
I have a JSR168 portlet in WebSphere portal 5.1 .
I have saved data in application-scope of the portlet session.
How can I retrieve that data at the servlet end.
My servlet gets invoked from a JSP on the portlet.

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

If you are dispatching the rendering to the Servlet/JSP and you include the data into the Application scope, then you will have access to it. Remeber according to the spec, the Portlet Session object is a wrapper around the HTTPSession object.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
GaneshKumar Kumar

Joined: May 23, 2006
Posts: 24
Attributes stored in PortletSession are accessable from the ServetSession and vice versa. So just set an attribute in the portlet session and access it from the servlet or jsp as usual.

I agree. Here's the link:
subject: Servlet communication with portlet
It's not a secret anymore!