Jahia Documentation > Documentation Usage

0 (0 Good)
0 (0 Bad)

Documentation Usage

by  westwood_nz »  2011/06/07 21:18

Currently I'm looking on how to integrate and communicate between two portlets deployed on Jahia.

Looking at the Portlet Integration Guide, these is a section on Portlet Events. A reference to a "PLT.15" is mentioned in there. What does that exactly refer to? Any more examples/docs talking about this topic?

Cheers

  (westwood_nz)

Number of messages  12
Registration date
0 (0 Good)
0 (0 Bad)

Re: Documentation Usage

by  ktlili »  2011/06/07 21:18

Hi,

"Portlet Events" are part of the Portlet specification (JSR 286) and is not specific to Jahia 6.0 . 
PLT.15 refers to the rule that describes "Portlet Events" in this specification.

The specification is available here:
http://jcp.org/en/jsr/detail?id=286

You can have more information about interportlet communication here:
http://www.jahia.org/cms/lang/en/home/J ... g_Portlets

and more about "Portlet events" here:
http://www.google.ch/#hl=fr&source=hp&q ... 309e0255d6
http://blog.xebia.com/2009/04/19/inter- ... h-jsr-286/ 

Regards.
KT

  • Re: Documentation Usage
    2011/07/08 09:33

    ktlili <p> Hi,<br /> <br /> &quot;Portlet Events&quot; are part of the Portlet specification (JSR 286) and is not specific to Jahia 6.0 .&nbsp;<br /> PLT.15 refers to the rule that describes &quot;Portlet Events&quot; in this specification.<br /> <br /> The specification is available here:<br /> <a href="http://jcp.org/en/jsr/detail?id=286">http://jcp.org/en/jsr/detail?id=286</a><br /> <br /> You can have more information about interportlet communication here:<br /> <a href="http://www.jahia.org/cms/lang/en/home/Jahiapedia/Jahia_Portlets/Sharing_Portlets">http://www.jahia.org/cms/lang/en/home/J ... g_Portlets</a><br /> <br /> and more about &quot;Portlet events&quot; here:<br /> <a href="http://www.google.ch/#hl=fr&amp;source=hp&amp;q=portlet+event&amp;meta=&amp;aq=0&amp;aqi=g1&amp;aql=&amp;oq=portlet+eve&amp;gs_rfai=&amp;fp=fb054f309e0255d6">http://www.google.ch/#hl=fr&amp;source=hp&amp;q ... 309e0255d6</a><br /> <a href="http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/">http://blog.xebia.com/2009/04/19/inter- ... h-jsr-286/</a>&nbsp;<br /> <br /> Regards.<br /> KT</p>

  • Number of messages  14
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Documentation Usage

    by  westwood_nz »  2011/06/07 21:18

    Thanks KT,

    So is there any working example of communication between two portlets on Jahia?

    Will be handy to get this going laugh

    Cheers,
    Saif

      (westwood_nz)

    Number of messages  12
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Documentation Usage

    by  ktlili »  2011/06/07 21:18

    Hi,

    At the end of the article specified in the previous post, that explains "portlet events ", the code source of the example is given:
    http://blog.xebia.com/wp-content/upload ... tEvent.zip

    You have just to deploy it in Jahia and remove what not part of the specification (in the jsp, remove call to a non-portlet taglib)

    In attachment, you'll find the corresponding war, done from the code source.

    To test it, you have to:
    1- deploy the war in your application server (for tomcat, put it webapps directory)
    2- Within the defaut set of template of Jahia, create a page with the "Full template"
    3- add the portlet "CityPortlet" and "CityInfo" in page create in 2.
    4- Validate the page created in 2.
    5- The porlet "CityPorlet" allows to select a city and "CityInfo" to display the result.

    Regards.
    KT

  • Re: Documentation Usage
    2011/07/08 09:34

    ktlili <p> Hi,<br /> <br /> At the end of the article specified in the previous post, that explains &quot;portlet events &quot;, the code source of the example is given:<br /> <a href="http://blog.xebia.com/wp-content/uploads/2009/11/RAD75PortletEvent.zip">http://blog.xebia.com/wp-content/upload ... tEvent.zip</a><br /> <br /> You have just to deploy it in Jahia and remove what not part of the specification (in the jsp, remove call to a non-portlet taglib)<br /> <br /> In attachment, you&#39;ll find the corresponding war, done from the code source.<br /> <br /> To test it, you have to:<br /> 1- deploy the war in your application server (for tomcat, put it webapps directory)<br /> 2- Within the defaut set of template of Jahia, create a page with the &quot;Full template&quot;<br /> 3- add the portlet &quot;CityPortlet&quot; and &quot;CityInfo&quot; in page create in 2.<br /> 4- Validate the page created in 2.<br /> 5- The porlet &quot;CityPorlet&quot; allows to select a city and &quot;CityInfo&quot; to display the result.<br /> <br /> Regards.<br /> KT</p>

  • Number of messages  14
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Documentation Usage

    by  westwood_nz »  2011/06/07 21:18

    Hi KT,

    The attached portlets war file does not quite work. It complains that the web.xml contains the extra word 'CityInfoPortlet'. After removing this word and deploying the war file into Jahia. The server still gives you the following error:

    Mar 23, 2010 10:10:25 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet CityPortlet threw exception
    java.lang.NoSuchMethodError: javax.portlet.PortletConfig.getContainerRuntimeOptions()Ljava/util/Map;
    at org.apache.pluto.tags.PortletURLTag286.doStartTag(PortletURLTag286.java:53)
    at org.apache.jsp._005fCityPortlet.jsp.html.CityPortletView_jsp._jspx_meth_portlet_005factionURL_005f0(CityPortletView_jsp.java:136)
    at org.apache.jsp._005fCityPortlet.jsp.html.CityPortletView_jsp._jspService(CityPortletView_jsp.java:111)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
    at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.internalInclude(PortletRequestDispatcherImpl.java:184)
    at org.apache.pluto.internal.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:127)
    at com.ibm.rad75portlet.CityPortlet.doView(CityPortlet.java:38)
    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
    at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
    at org.apache.pluto.driver.services.container.FilterChainImpl.doFilter(FilterChainImpl.java:163)
    at org.apache.pluto.driver.services.container.FilterChainImpl.processFilter(FilterChainImpl.java:90)
    at org.apache.pluto.driver.services.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:90)
    at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:235)
    at org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:164)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
    at org.apache.pluto.core.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:217)
    at org.apache.pluto.core.DefaultPortletInvokerService.render(DefaultPortletInvokerService.java:108)
    at org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:201)
    at org.jahia.services.applications.pluto.PlutoDispatchingProvider.render(PlutoDispatchingProvider.java:142)
    at org.jahia.services.applications.DispatchingServiceImpl.getAppOutput(DispatchingServiceImpl.java:122)
    at org.jahia.services.applications.DispatchingServiceImpl$$FastClassByCGLIB$$7271be17.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at org.jahia.services.applications.DispatchingServiceImpl$$EnhancerByCGLIB$$a31320cc.getAppOutput(<generated>)
    at org.jahia.ajax.gwt.commons.server.rpc.JahiaServiceImpl.drawPortletInstanceOutput(JahiaServiceImpl.java:286)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.jahia.ajax.gwt.commons.server.AbstractJahiaGWTServiceImpl.service(AbstractJahiaGWTServiceImpl.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.jahia.ajax.gwt.commons.server.AbstractJahiaGWTServiceImpl.service(AbstractJahiaGWTServiceImpl.java:72)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jahia.bin.filters.jcr.JcrSessionFilter.doFilter(JcrSessionFilter.java:40)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

    Now maybe we can fix this, however, the war file does not contain the source files! Do you have access to the source files? Can we get this fixed? Alternatively I have another war file that I got it partially working including the source files..I I have attached the zip file. To get it working do the following:

    unzip the file
    Make sure ANT in installed on your machine
    Using the command window, navigate to the folder where the build.xml file exists and then type the command "ant dist", this should generate the war file inside the "dist" folder.
    Deploy the war file generated above to Jahia and then add the three portlets included in the war(AccountBalance_A, AccountBalance_B, and FundTransfer) to a portal page.

    The problem occuring is that when hitting the 'transfer' button, an exception occurs. Maybe we can direct oursleves to solving this problem if the source is not available in the war file you provided?

    let me know what happens!

    Best regards

      (westwood_nz)

    Number of messages  12
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Documentation Usage

    by  ktlili »  2011/06/07 21:18

    Hi,

    As specified in the last post,

     

    At the end of the article specified in the previous post, that explains "portlet events ", the code source of the example is given:

    http://blog.xebia.com/wp-content/upload ... tEvent.zip

    the code source is available here: http://blog.xebia.com/wp-content/uploads/2009/11/RAD75PortletEvent.zip

    and the details of how it works is here : http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/

    Here is what a I did to make the portlet works with Jahia:

    1- Downloaded Jahia 6 EE from http://www.jahia.com/jahia/Jahia/Home/products/download

    2- Run the config wizard and selected HSQL as DB

    3- Import the acme demo 

    4- Create a page with type "Full Template"

    5- Copy manualy the war in attachment of the previous post (portlet-event.war) in tomcat/webapps

    6- From the created page, Click on the "Portlet" than "add to list" (a new popup is opened)

    7- Click on add mashups. (a wizard window is opened)

    8- Select CityPortlet and finish the wizard (a wizard window is closed)

    9- select the new created mashup 

    10- repeat 6-7-8-9 with CityInfoPortlet

    At the end, there is 2 portlets on your page CityPortlet and CityInfoPortlet. CityPortlet allows to select a city and CityInfoPortlet to view the city info. (see screenchot)

    What is the step that is different from what I did? 

    Can you describe all what you did (from the install) to get it work?

    Regards.KT

     

  • Re: Documentation Usage
    2011/07/08 09:39

    ktlili <p> Hi,<br /> <br /> As specified in the last post,</p> <p> &nbsp;</p> <p> <title></title> </p> <blockquote> <p> At the end of the article specified in the previous post, that explains &quot;portlet events &quot;, the code source of the example is given:</p> </blockquote> <p> <a href="http://blog.xebia.com/wp-content/upload">http://blog.xebia.com/wp-content/upload</a> ... tEvent.zip</p> <p> the code source is available here: <a href="http://blog.xebia.com/wp-content/uploads/2009/11/RAD75PortletEvent.zip">http://blog.xebia.com/wp-content/uploads/2009/11/RAD75PortletEvent.zip</a></p> <p> and the details of how it works is here : <a href="http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/">http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/</a></p> <p> Here is what a I did to make the portlet works with Jahia:</p> <p> 1- Downloaded Jahia 6 EE from <a href="http://www.jahia.com/jahia/Jahia/Home/products/download">http://www.jahia.com/jahia/Jahia/Home/products/download</a></p> <p> 2- Run the config wizard and selected HSQL as DB</p> <p> 3- Import the acme demo&nbsp;</p> <p> 4- Create a page with type &quot;Full Template&quot;</p> <p> 5- Copy manualy the war in attachment of the previous post (portlet-event.war) in tomcat/webapps</p> <p> 6- From the created page, Click on the &quot;Portlet&quot; than &quot;add to list&quot; (a new popup is opened)</p> <p> 7- Click on add mashups. (a wizard window is opened)</p> <p> 8- Select CityPortlet and finish the wizard (a wizard window is closed)</p> <p> 9- select the new created mashup&nbsp;</p> <p> 10- repeat 6-7-8-9 with CityInfoPortlet</p> <p> At the end, there is 2 portlets on your page CityPortlet and CityInfoPortlet. CityPortlet allows to select a city and CityInfoPortlet to view the city info. (see screenchot)</p> <p> What is the step that is different from what I did?&nbsp;</p> <p> Can you describe all what you did (from the install) to get it work?</p> <p> Regards.KT</p> <blockquote> <p> &nbsp;</p> </blockquote>

  • Number of messages  14
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Documentation Usage

    by  westwood_nz »  2011/06/07 21:18

    Great this works! For some reason I had to do a new install as my exisiting jahia server threw a few exceptions when deploying that war file. Also I was adding the war file from the Administration panel and going through the 'prepare war file' step. This time around I did not do that and just followed the steps mentioned above.

    Thanks for your help indeed!

      (westwood_nz)

    Number of messages  12
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page