Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
JSR 286 Interportlet Communication - any code examples? David Wainwright April 24, 2008 7:54 AM
RE: JSR 286 Interportlet Communication - any code examples? Hervé Ménage May 19, 2008 2:27 AM
RE: JSR 286 Interportlet Communication - any code examples? The Meurwinn Concept Concept June 11, 2008 6:00 AM
RE: JSR 286 Interportlet Communication - any code examples? Hervé Ménage June 11, 2008 6:42 AM
RE: JSR 286 Interportlet Communication - any code examples? Richard Youngkin October 17, 2008 7:34 PM
RE: JSR 286 Interportlet Communication - any code examples? Michael Weber October 18, 2008 4:19 AM
RE: JSR 286 Interportlet Communication - any code examples? Richard Youngkin October 20, 2008 9:10 AM
RE: JSR 286 Interportlet Communication - any code examples? Richard Youngkin October 20, 2008 6:59 PM
RE: JSR 286 Interportlet Communication - any code examples? Anonymous October 17, 2008 8:33 PM
RE: JSR 286 Interportlet Communication - any code examples? ankit yakkundi March 17, 2011 4:29 AM
RE: JSR 286 Interportlet Communication - any code examples? Snake Syjmick April 19, 2011 12:09 PM
RE: JSR 286 Interportlet Communication - any code examples? Corné Aussems April 19, 2011 12:26 PM
RE: JSR 286 Interportlet Communication - any code examples? aditya sanas September 2, 2011 5:39 AM
RE: JSR 286 Interportlet Communication - any code examples? cipal cipal March 31, 2009 7:07 AM
RE: JSR 286 Interportlet Communication - any code examples? Manish Kumar Gupta March 31, 2009 8:07 AM
RE: JSR 286 Interportlet Communication - any code examples? cipal cipal April 1, 2009 1:32 AM
RE: JSR 286 Interportlet Communication - any code examples? Manish Kumar Gupta April 1, 2009 2:46 AM
RE: JSR 286 Interportlet Communication - any code examples? cipal cipal April 1, 2009 3:04 AM
RE: JSR 286 Interportlet Communication - any code examples? Manish Kumar Gupta April 1, 2009 4:23 AM
RE: JSR 286 Interportlet Communication - any code examples? cipal cipal April 1, 2009 6:58 AM
RE: JSR 286 Interportlet Communication - any code examples? Manish Kumar Gupta April 1, 2009 12:08 PM
RE: JSR 286 Interportlet Communication - any code examples? cipal cipal April 2, 2009 12:12 AM
RE: JSR 286 Interportlet Communication - any code examples? Manish Kumar Gupta April 2, 2009 12:42 AM
RE: JSR 286 Interportlet Communication - any code examples? cipal cipal April 2, 2009 1:02 AM
RE: JSR 286 Interportlet Communication - any code examples? Madhura Raut January 20, 2011 1:10 AM
RE: JSR 286 Interportlet Communication - any code examples? Neil Griffin January 27, 2012 3:31 PM
RE: JSR 286 Interportlet Communication - any code examples? Madhura Raut March 1, 2012 10:35 PM
RE: JSR 286 Interportlet Communication - any code examples? Ruchi Agrawal January 20, 2010 7:57 AM
RE: JSR 286 Interportlet Communication - any code examples? sasi kala February 26, 2010 2:28 AM
RE: JSR 286 Interportlet Communication - any code examples? satya jangala September 17, 2011 5:00 AM
RE: JSR 286 Interportlet Communication - any code examples? jsd jsd August 21, 2009 11:28 PM
RE: JSR 286 Interportlet Communication - any code examples? whyBish valid October 29, 2009 8:06 PM
RE: JSR 286 Interportlet Communication - any code examples? Ruchi Agrawal January 20, 2010 7:48 AM
RE: JSR 286 Interportlet Communication - any code examples? Pankaj Sinha May 20, 2010 4:38 AM
RE: JSR 286 Interportlet Communication - any code examples? Charles de Courval July 31, 2010 12:03 PM
RE: JSR 286 Interportlet Communication - any code examples? Deepak Kenchamba November 6, 2010 10:35 AM
RE: JSR 286 Interportlet Communication - any code examples? Sid L December 12, 2010 9:58 PM
RE: JSR 286 Interportlet Communication - any code examples? Manikandan S September 5, 2011 4:04 AM
David Wainwright
JSR 286 Interportlet Communication - any code examples?
April 24, 2008 7:54 AM
Answer

David Wainwright

Rank: New Member

Posts: 23

Join Date: September 14, 2007

Recent Posts

Hallo,

I'm trying to get JSR 286 compliant interportlet communication (event based) working in Lifetray 5.0.1. Does anyone know of (or have) a sample application(s) that run in Liferay?

Thanks in advance,
dwainwr.
Hervé Ménage
RE: JSR 286 Interportlet Communication - any code examples?
May 19, 2008 2:27 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hello,

Please find attached a very simple example: a portlet sends an event, which is listened by the 2nd one.
I am using QNames, and it works fine.

However, some questions remains:
- Is a wiring tool planned ? Required to wire portlets events when we do not have the control on their deployment descriptor.
- How event local names are handled ?
- Is there any way to send events over pages? Sort of action+setEvent+redirect followed by event processing+view on the target page?

Thank you for your help
Regards
Hervé

P.S: rename .ZIP files into .WAR
Attachments: Jsr286EventListenerPortlet.zip (6.1k), Jsr286EventPublisherPortlet.zip (131.6k)
The Meurwinn Concept Concept
RE: JSR 286 Interportlet Communication - any code examples?
June 11, 2008 6:00 AM
Answer

The Meurwinn Concept Concept

Rank: Expert

Posts: 262

Join Date: April 9, 2006

Recent Posts

Hi, your sample portlets are very nice.

So, it works fine but the problem is that when i click on the submit button, all the page is refresh and not only the portlet.

Do you have any issue about this ?
Hervé Ménage
RE: JSR 286 Interportlet Communication - any code examples?
June 11, 2008 6:42 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Thank you, always glad to contribute !

You raised a very interesting question. You are asking if an event submitted by the PublisherPortlet could invoke the ListenerPortlet event processing and render methods only.

Please allow me to give to try to develop a technical answer, although I think we could discuss design (but I'd need more info about what you intend doing). I think it can be an interesting discussion:
- The event is fired by the PublisherPortlet when it processes a request (action or event request) : it is the setEvent() method.
- The publisher portlet state (I mean the business model) might have changed, thus it needs to be rendered,
- The listener portlet receives the event and processes it as a request. Its state may change too, and it needs to be rendered as well.
- Thus it makes sense the portal page is refreshed, and you can use caching mechanisms to optimize the page refresh.

Basically, you would make use of Ajax to handle events. I think the new "resource" mechanism specified by JSR286 is well suited to handle AJAX requests. Unfortunately, you cannot set events on a ResourceResponse object.

Hope this helps,
Regards
Hervé
Richard Youngkin
RE: JSR 286 Interportlet Communication - any code examples?
October 17, 2008 7:34 PM
Answer

Richard Youngkin

Rank: New Member

Posts: 7

Join Date: August 26, 2008

Recent Posts

Hi,

I'm having trouble compiling with the annotations (e.g., @RenderMode) in these examples. What am I (obvious thing :> ) am I missing?

Thanks,
Rich
Anonymous
RE: JSR 286 Interportlet Communication - any code examples?
October 17, 2008 8:33 PM
Answer

Anonymous

Any JSF portlet sample that implements JSR 286 IPC?
Michael Weber
RE: JSR 286 Interportlet Communication - any code examples?
October 18, 2008 4:19 AM
Answer

Michael Weber

Rank: New Member

Posts: 23

Join Date: September 19, 2008

Recent Posts

Richard Youngkin:
I'm having trouble compiling with the annotations (e.g., @RenderMode) in these examples. What am I (obvious thing :> ) am I missing?


Hi Rich,

I think your problem might be your java version.
Annotations have been introduced in Java 5.0.
Therefore, to use annotations in your code you need at least Java 5.0.

Regards,
Michael Weber
Richard Youngkin
RE: JSR 286 Interportlet Communication - any code examples?
October 20, 2008 9:10 AM
Answer

Richard Youngkin

Rank: New Member

Posts: 7

Join Date: August 26, 2008

Recent Posts

Michael,

I should have been more specific in my post. I actually have java 6, so that base is covered. I'm also using version 5.0.1 of LifeRay, which I had understood to support JSR-286. So the annotation processor should also be available. I'm guessing that my compile classpath isn't configured correctly (i.e., can't find the @RenderMode class that implements the annotation). I'm probably missing something in the LifeRay jar set, but I just can't see what it might be. Googling "LifeRay annotation" doesn't turn up anything useful either.

Thanks,
Rich
Richard Youngkin
RE: JSR 286 Interportlet Communication - any code examples?
October 20, 2008 6:59 PM
Answer

Richard Youngkin

Rank: New Member

Posts: 7

Join Date: August 26, 2008

Recent Posts

Found my problem - I was missing "portlet.jar" from the "Additional Files" link on the current downloads page. I'm not sure how it happened, but the version I had been referencing was missing the annotation processing class for @RenderMode.
cipal cipal
RE: JSR 286 Interportlet Communication - any code examples?
March 31, 2009 7:07 AM
Answer

cipal cipal

Rank: New Member

Posts: 10

Join Date: December 11, 2008

Recent Posts

i tried the portlets posted by Hervé Ménage above (thanks for sharing btw).
They work fine in Sun Web Spaces Server 10, but not in Liferay 5.2.2 in Glassfish 2.

What is so different about these two setups?
Anyone have any idea? thanks in advance!

-jeroen
Manish Kumar Gupta
RE: JSR 286 Interportlet Communication - any code examples?
March 31, 2009 8:07 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

clean you explain more ...What problem are you facing on Liferay?
cipal cipal
RE: JSR 286 Interportlet Communication - any code examples?
April 1, 2009 1:32 AM
Answer

cipal cipal

Rank: New Member

Posts: 10

Join Date: December 11, 2008

Recent Posts

hi Manish,

Sorry if i wasn't clear enough, i thought maybe this was a known issue.

I get a class cast exception in glassfish2 + liferay 5.2.2 , i don't with Sun web space server 10

this is the exception:

 1
 2ERROR [jsp:967] java.lang.ClassCastException: mypackage.ContactEvent
 3java.lang.ClassCastException: mypackage.ContactEvent
 4    at mypackage.Jsr286EventListenerPortlet.processEvent(Jsr286EventListenerPortlet.java:44)
 5    at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:152)
 6    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:63)
 7    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:100)
 8    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 9    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
10    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
11    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
12    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
13    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
14    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:616)
15    at com.liferay.portlet.InvokerPortletImpl.invokeEvent(InvokerPortletImpl.java:680)
16    at com.liferay.portlet.InvokerPortletImpl.processEvent(InvokerPortletImpl.java:383)
17    at com.liferay.portal.action.LayoutAction.processEvent(LayoutAction.java:345)
18    at com.liferay.portal.action.LayoutAction.processEvents(LayoutAction.java:396)
19    at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:612)
20    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:423)
21    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
22    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
23    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
24    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:159)
25    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
26    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
27    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
28    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:505)
29    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:732)
30    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
31    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
32    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
33    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
34    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
35    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
36    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
37    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:143)
38    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
39    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
40    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
41    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
42    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
43    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:142)
44    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
45    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
46    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
47    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
48    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
49    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
50    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
51    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
52    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
53    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282)
54    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
55    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
56    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
57    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
58    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
59    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
60    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
61    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
62    at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:417)
63    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
64    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
65    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
66    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
67    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:244)
68    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
69    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
70    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
71    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
72    at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:73)
73    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
74    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
75    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
76    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
77    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
78    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
79    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
80    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
81    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
82    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:275)
83    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
84    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
85    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
86    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
87    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
88    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
89    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
90    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
91    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
92    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
93    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
94    at org.apache.catalina.core.StandardC|#]


This is the processEvent method:
 1
 2       @ProcessEvent(qname="{http:mycompany.com/events}contactInfo")
 3    @Override
 4    public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException {
 5        // Let's store the event value into the portlet's session (we assume it is never null)
 6    // line 44:
 7        mypackage.ContactEvent contactEvent = (mypackage.ContactEvent) request.getEvent().getValue();
 8
 9        ContactInfoBean contactInfo = new ContactInfoBean();
10        contactInfo.setName(contactEvent.getName());
11        contactInfo.setEmail(contactEvent.getEmail());
12       
13        request.getPortletSession().setAttribute("contactInfo", contactInfo);
14    }
Manish Kumar Gupta
RE: JSR 286 Interportlet Communication - any code examples?
April 1, 2009 2:46 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

The ClassCastException comes when you do eventing between 2 portlets deployed in different wars and your payload object (mypackage.ContactEvent) is not in the server class path.

Is this the case with you?
cipal cipal
RE: JSR 286 Interportlet Communication - any code examples?
April 1, 2009 3:04 AM
Answer

cipal cipal

Rank: New Member

Posts: 10

Join Date: December 11, 2008

Recent Posts

Manish Kumar Gupta:
The ClassCastException comes when you do eventing between 2 portlets deployed in different wars and your payload object (mypackage.ContactEvent) is not in the server class path.

Is this the case with you?


Thank you for the explanation!

Yes, they publisher and listener are two wars. How do i place the payload object on the server class path?
Manish Kumar Gupta
RE: JSR 286 Interportlet Communication - any code examples?
April 1, 2009 4:23 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

You need to create a separate jar for your payload classes and copy it in your server classpath (for example under domains/domain1/lib).
cipal cipal
RE: JSR 286 Interportlet Communication - any code examples?
April 1, 2009 6:58 AM
Answer

cipal cipal

Rank: New Member

Posts: 10

Join Date: December 11, 2008

Recent Posts

Manish Kumar Gupta:
You need to create a separate jar for your payload classes and copy it in your server classpath (for example under domains/domain1/lib).


hi Manish, thanks for the reply. This works.
But is there another way to share the payload object? So that deployment can be done with one file, one war, as opposed to adding one jar to the application server?
(I tried putting the jar in both war's lib folders, but that didn't work.)

PS: i still don't quite understand why seperate payload objects do work in Sun Web Space Server though :S
Manish Kumar Gupta
RE: JSR 286 Interportlet Communication - any code examples?
April 1, 2009 12:08 PM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Ok, here is the trick emoticon.
In your portal-ext.properties, you need to add portlet.container.impl=sun
to work eventing between 2 wars w/o putting jars in the server classpath.
cipal cipal
RE: JSR 286 Interportlet Communication - any code examples?
April 2, 2009 12:12 AM
Answer

cipal cipal

Rank: New Member

Posts: 10

Join Date: December 11, 2008

Recent Posts

Manish Kumar Gupta:
Ok, here is the trick emoticon.
In your portal-ext.properties, you need to add portlet.container.impl=sun
to work eventing between 2 wars w/o putting jars in the server classpath.


hehe, okay, thanks for the trick
i suppose this will break compatibility with JSR-286 ...
is this going to be a topic for a future spec maybe?
Manish Kumar Gupta
RE: JSR 286 Interportlet Communication - any code examples?
April 2, 2009 12:42 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Hi Jeroen,

I didn't understood you comment. How will this break compatibility with JSR-286 ?
LR has 2 implementation of portlet container. I was suggesting to switch the container to the one provided by Sun and redeploy your portlets....That's it.
The sun container uses JAXB to pass payload from one portlet to another and that's why no server class path copy is required for payload classes.

Manish.
cipal cipal
RE: JSR 286 Interportlet Communication - any code examples?
April 2, 2009 1:02 AM
Answer

cipal cipal

Rank: New Member

Posts: 10

Join Date: December 11, 2008

Recent Posts

Manish Kumar Gupta:
Hi Jeroen,

I didn't understood you comment. How will this break compatibility with JSR-286 ?
LR has 2 implementation of portlet container. I was suggesting to switch the container to the one provided by Sun and redeploy your portlets....That's it.
The sun container uses JAXB to pass payload from one portlet to another and that's why no server class path copy is required for payload classes.

Manish.


Ah, okay, i mistakenly assumed switching to another container implementation would break compatibility with JSR286.
My apologies.

Thank you very much for all your help, Manish!
jsd jsd
RE: JSR 286 Interportlet Communication - any code examples?
August 21, 2009 11:28 PM
Answer

jsd jsd

Rank: New Member

Posts: 24

Join Date: May 17, 2006

Recent Posts

Your example doesn't appear to be jsr-286 as I understand it. It was possible to communicate between portlets in jsr-168. In order for it to be jsr-286 it has to be ajax, thus your "submit" button won't do it. It needs to be a plain old input "button" that fires off an ajax request.
whyBish valid
RE: JSR 286 Interportlet Communication - any code examples?
October 29, 2009 8:06 PM
Answer

whyBish valid

Rank: Junior Member

Posts: 63

Join Date: July 9, 2009

Recent Posts

http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Inter-portlet+communication
Jonas Yuan
RE: JSR 286 Interportlet Communication - any code examples?
November 5, 2009 6:05 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Giri,

You can find JSR 286 IPC example at

Code Download

Chapter 2 and Chapter 10 give details of customization and development from
Liferay Portal 5.2 Systems Development

Hope that it helps.

Thanks

Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Ruchi Agrawal
RE: JSR 286 Interportlet Communication - any code examples?
January 20, 2010 7:48 AM
Answer

Ruchi Agrawal

Rank: New Member

Posts: 3

Join Date: January 20, 2010

Recent Posts

Hi Herve,

Thanks for posting the IPC code. It was very helpful.
I am very new to the Liferay portal dev.

I need to implement the IPC example in my existing framework.
I am using Liferay5.2.3 with Tomcat 5.5.28.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.

Thanks!
-Ruchi
Ruchi Agrawal
RE: JSR 286 Interportlet Communication - any code examples?
January 20, 2010 7:57 AM
Answer

Ruchi Agrawal

Rank: New Member

Posts: 3

Join Date: January 20, 2010

Recent Posts

Hi Manish,
I had downloaded the Inter Portlet example which Herve had posted. It was very helpful.
I am very new to the Liferay portal dev.

I need to implement the IPC example in my existing framework.
I am using Liferay5.2.3 with Tomcat 5.5.28.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.

Thanks!
-Ruchi
sasi kala
RE: JSR 286 Interportlet Communication - any code examples?
February 26, 2010 2:28 AM
Answer

sasi kala

Rank: New Member

Posts: 4

Join Date: January 20, 2010

Recent Posts

Hi Manish,
I had downloaded the Inter Portlet example... It was very helpful...
I am very new to the Liferay portal development.

I need to implement the Inter Portlet Communication example....
I am using Liferay5.2.3 with Tomcat 6.0.18.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.
thank u
Pankaj Sinha
RE: JSR 286 Interportlet Communication - any code examples?
May 20, 2010 4:38 AM
Answer

Pankaj Sinha

Rank: Junior Member

Posts: 29

Join Date: April 26, 2010

Recent Posts

Ruchi Agrawal:
Hi Herve,

Thanks for posting the IPC code. It was very helpful.
I am very new to the Liferay portal dev.

I need to implement the IPC example in my existing framework.
I am using Liferay5.2.3 with Tomcat 5.5.28.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.

Thanks!
-Ruchi


Hi Ruchi,

Just go thru the word doc attached and u'll find a simple way for IPC, Its working...

Thanx & Regards,
Pankaj
Attachments: IPC.doc (27.0k)
Charles de Courval
RE: JSR 286 Interportlet Communication - any code examples?
July 31, 2010 12:03 PM
Answer

Charles de Courval

Rank: Junior Member

Posts: 55

Join Date: July 31, 2010

Recent Posts

Thanks for the explanation on IPC for portlet that reside on the same page.

The problem that I have is IPC between portlet that reside on 2 different page where action on one portlet of one page would result in an other page displaying the results in its portlet. I'm successful in having the other portlet reaction to the event, but the page associated with it is never displayed.

In more details:

I have a page which contains one portlet that display a list of items­. This page is called PRODUCTS.
I have a hidden page called DETAILS which contains one portlet that displays the product details.
What I wish is that when I click on a product on the list, I want to be redirected to the DETAILS page and have that products details displayed.

I'm was successful in having the details portlet act on the display event, but it never redirect the user to the DETAILS page.

I did found this configuration in portlet-ext.xml, portlet.event.distribution = layout-set, that allow portlet not on a page to listen to an event.

But I'm missing something to make the responding portlet display its information.

So, what am i missing ?

thanks
Deepak Kenchamba
RE: JSR 286 Interportlet Communication - any code examples?
November 6, 2010 10:35 AM
Answer

Deepak Kenchamba

Rank: New Member

Posts: 3

Join Date: October 11, 2010

Recent Posts

Portlet1-portlet.war

portlet.xml

 1[size=5]<portlet-app version="2.0"
 2    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
 3    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
 5        http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
 6   
 7        <portlet>
 8        <portlet-name>Portlet1</portlet-name>
 9        <display-name>Portlet1</display-name>
10                .........
11        <supported-publishing-event>
12            <qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
13        </supported-publishing-event>
14    </portlet>
15    <event-definition>
16        <qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
17        <value-type>java.lang.String</value-type>
18    </event-definition>
19</portlet-app>[/size]


JSP Page

1[size=5]<portlet:actionURL var="fireEvent">
2    <portlet:param name="action" value="getDocumentDetails" />
3    <portlet:param name="documentId" value="126" />
4</portlet:actionURL>
5<a href="${fireEvent}">here</a>[/size]


Handler Method (in Controller class)

 1[size=5]@ActionMapping(params = "action=getDocumentDetails")
 2    public void getDocumentDetails(ActionRequest request,
 3            ActionResponse response, ModelMap map,
 4            @RequestParam String documentId) {
 5        System.out.println(" documentId := " + documentId);
 6        try {
 7            System.out.println("Sender Application ");
 8            QName eventName = new QName("http://code.kenchamba.com",
 9                    "testevent");
10            response.setEvent(eventName, documentId);
11
12        } catch (Exception ex) {
13            ex.printStackTrace();
14        }
15    }[/size]



Portlet2-portlet.war

portlet.xml

 1[size=5]<portlet-app version="2.0"
 2    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
 3    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
 5        http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
 6    <portlet>
 7        <portlet-name>Portlet2</portlet-name>
 8        <display-name>Portlet2</display-name>
 9                ............
10                <supported-processing-event>
11            <qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
12        </supported-processing-event>
13    </portlet>
14    <event-definition>
15        <qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
16        <value-type>java.lang.String</value-type>
17    </event-definition>
18</portlet-app>[/size]


Handler Method (in Controller class)

 1[size=5]@EventMapping("testevent")
 2    public void testReceiverEvent(EventRequest request,
 3            EventResponse eventResponse, ModelMap map) {
 4        Event event = request.getEvent();
 5
 6        System.out.println("testReceiverEvent");
 7
 8        if (event.getName().equals("testevent")) {
 9            String documentId = (String) event.getValue();
10            System.out.println("documentId=" + documentId);
11        }
12    }[/size]
Sid L
RE: JSR 286 Interportlet Communication - any code examples?
December 12, 2010 9:58 PM
Answer

Sid L

Rank: Junior Member

Posts: 28

Join Date: December 2, 2010

Recent Posts

any working solution to this?
Madhura Raut
RE: JSR 286 Interportlet Communication - any code examples?
January 20, 2011 1:10 AM
Answer

Madhura Raut

Rank: Junior Member

Posts: 41

Join Date: November 11, 2010

Recent Posts

Hi,
I am facing the same problem.
I have placed the jar of my listner in domain/domain/lib folder but still whenever i invoke the ipc event the following exception is thrown:


[#|2011-01-20T14:35:13.683+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=26;_ThreadName=httpSSLWorkerThread-8080-3;|14:35:13,683 ERROR [jsp:964] org.portletfaces.bridge.BridgeException: java.lang.ClassCastException: org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer
org.portletfaces.bridge.BridgeException: java.lang.ClassCastException: org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer
at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:186)
at org.portletfaces.bridge.GenericFacesPortlet.processEvent(GenericFacesPortlet.java:166)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:86)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:58)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:873)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:628)
at com.liferay.portlet.InvokerPortletImpl.invokeEvent(InvokerPortletImpl.java:695)
at com.liferay.portlet.InvokerPortletImpl.processEvent(InvokerPortletImpl.java:390)
at com.liferay.portal.action.LayoutAction.processEvent(LayoutAction.java:458)
at com.liferay.portal.action.LayoutAction.processEvents(LayoutAction.java:509)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:796)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:571)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:229)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:152)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:502)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:479)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:288)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:137)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:204)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:871)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:259)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126)
at com.|#]

[#|2011-01-20T14:35:13.683+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=26;_ThreadName=httpSSLWorkerThread-8080-3;|liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:204)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:221)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:440)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:45)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:81)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:179)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:241)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.threadlocal.ThreadLocalFilter.processFilter(ThreadLocalFilter.java:35)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.lang.ClassCastException: org.portletfaces.bridge.cont|#]

[#|2011-01-20T14:35:13.683+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=26;_ThreadName=httpSSLWorkerThread-8080-3;|ainer.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer
at org.portletfaces.bridge.container.PortletContainerFactory.getPortletContainer(PortletContainerFactory.java:39)
at org.portletfaces.bridge.container.PortletContainerFactory.getPortletContainer(PortletContainerFactory.java:56)
at org.portletfaces.bridge.context.ExternalContextImpl.preInitializeObjects(ExternalContextImpl.java:372)
at org.portletfaces.bridge.context.ExternalContextImpl.<init>(ExternalContextImpl.java:135)
at org.portletfaces.bridge.context.ExternalContextFactoryImpl.getExternalContext(ExternalContextFactoryImpl.java:57)
at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:89)
at org.portletfaces.bridge.BridgeImpl.getFacesContext(BridgeImpl.java:363)
at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:143)
... 175 more
|#]



I am using glassfish v2.1.1 server. please help me.
ankit yakkundi
RE: JSR 286 Interportlet Communication - any code examples?
March 17, 2011 4:29 AM
Answer

ankit yakkundi

Rank: Regular Member

Posts: 221

Join Date: March 4, 2010

Recent Posts

Hi..
I am using Liferay 6 and plugin SDK.
I have created two struts portlet.
I have the following requirement:-

When the user clicks on the link on a portlet A residing on Page A i would like to navigate the user to Page B and portlet B on that page populated.



Is it possible??
I have heard about InterPortlet Communication,but not Inter Portlet-Page Communication..

Any idea,suggestions are welcome..
Thanks in advance.
Snake Syjmick
RE: JSR 286 Interportlet Communication - any code examples?
April 19, 2011 12:09 PM
Answer

Snake Syjmick

Rank: New Member

Posts: 7

Join Date: March 22, 2011

Recent Posts

Any luck with that?
Corné Aussems
RE: JSR 286 Interportlet Communication - any code examples?
April 19, 2011 12:26 PM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1279

Join Date: October 3, 2006

Recent Posts

in liferay-portlet:actionURL there are 2 attributes that will aid you;

plid = our destination layout id
portletName = your official portletname

1
2<liferay-portlet:actionURL name="searchForm" plid="12345" portletName="foo_WAR_project" var="searchURL" />
aditya sanas
RE: JSR 286 Interportlet Communication - any code examples?
September 2, 2011 5:39 AM
Answer

aditya sanas

Rank: New Member

Posts: 4

Join Date: August 22, 2011

Recent Posts

"Unfortunately, you cannot set events on a ResourceResponse object."

is this achievable now?
can we set events in anyway when we are using ReourceMapping???
Manikandan S
RE: JSR 286 Interportlet Communication - any code examples?
September 5, 2011 4:04 AM
Answer

Manikandan S

Rank: Expert

Posts: 492

Join Date: September 15, 2010

Recent Posts

Hi guys,
Here you can find the examples of this solution with ajax link
satya jangala
RE: JSR 286 Interportlet Communication - any code examples?
September 17, 2011 5:00 AM
Answer

satya jangala

Rank: New Member

Posts: 8

Join Date: November 8, 2010

Recent Posts

Manish Kumar Gupta:
clean you explain more ...What problem are you facing on Liferay?



hi manish,

please help me , how create the lar file and how the ipc... if u have the code please send me jangala.satya143@gmail.com


thanks in advance
satya
Neil Griffin
RE: JSR 286 Interportlet Communication - any code examples?
January 27, 2012 3:31 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2216

Join Date: July 26, 2005

Recent Posts

FWIW, I saw this happen today when the following was present in the WEB-INF/liferay-portlet.xml descriptor:

1<private-request-attributes>false</private-request-attributes>


According to the Liferay FAQ Wiki page:

"This method can possibly result in a ClassCastException (especially for multiple portlets in multiple WARs) and is therefore not recommended"
Madhura Raut
RE: JSR 286 Interportlet Communication - any code examples?
March 1, 2012 10:35 PM
Answer

Madhura Raut

Rank: Junior Member

Posts: 41

Join Date: November 11, 2010

Recent Posts

Hi Neil,

Is their any way to provide webcast and video file upload and preview (*.avi, *.mov, *.wmv) in liferay 6.0.6?