0

I got the impression from reading articles on jsr286 eventing that the eventing feature enables portlets to communicate with one another if they belong to different .war files.

I just want to confirm that even if 2 portlets belong to same war file, the only way they can communicate is through eventing.

Since the whole request forwarding feature of servlets do not apply to portlets. Is this correct?

Victor
  • 16,609
  • 71
  • 229
  • 409

1 Answers1

0

Portlets events can be used between portlets in the same wars or in different wars. However, one of the limitations of the portlets events is that the 2 portlets must be on the same page.

There are others ways to communicate between 2 portlets. You can use Public Render Parameters. The idea is that the first portlet sets a parameter, and the second portlet can read it in order to retrieve the value. You can also use the Application scope of the PortletSession to communicate and share data. The application scope (APPLICATION_SCOPE) of a PortletSession is shared between all the portlets of the same war.

Thomas
  • 541
  • 2
  • 10
  • Portlets on different pages can comminucate using events. We use it all the time on my current project. Public Render Params and the PortletSession are valid ways to communicate. – Nick Roth Apr 09 '13 at 13:43
  • @Thomas:Thanks...but portlets can be on diff pages too, not same page. Also I get your point about the scopes but by communication i meant one portlet asking another portlet to do something and the second portlet givign a response back to first portlet. Looks like the onyl way to do this is eventing. – Victor Apr 09 '13 at 14:16
  • @NickRoth I was talking about what the specification defines. I guess you use a portal which allows that, but this is specific to your portal. – Thomas Apr 13 '13 at 17:37