Re: Downloaded jpetstore 1.5 version doesn't work with my Jahia 5.02 installation

Clemens Düpmeier <[email protected]> Tue, 09 Oct 2007 10:21:10 +0200
Newsgroups gmane.comp.cms.jahia.devel
Organization Forschungszentrum Karlsruhe
Message-ID <[email protected]>
Hi Khaled,
thanks for your quick answser. Your version works. I observed that it 
contains a different entry for the ServletContextProvider

-------------
<portlet-app id="jpetstore" version="4.0.5">
   <portlet id="JPetStorePortlet">
     <init-param>
       <name>ServletContextProvider</name>
      <value>org.apache.jetspeed.portlet.ServletContextProviderImpl</value>
     </init-param>
...
-------------

in the portlet.xml file. It was

-------------
<portlet-app id="jpetstore" version="4.0.5">
   <portlet id="JPetStorePortlet">
     <init-param>
       <name>ServletContextProvider</name>
       <value>ca.mun.portal.bridges.PortalServletContextProvider</value>
     </init-param>
...
--------------

in the jpetstore_1.5.war file that I downloaded from the official 
website and the implementation of this ServletContextProvider is 
explicitly contained in the jpetstore_1.5.war file as a 
uPortalContextProvider.jar file.

Your version of the jpetstore.war file doesn't contain the 
org.apache.jetspeed.portlet.ServletContextProviderImpl class so I guess 
it's been already contained in Jahia. So I should use 
org.apache.jetspeed.portlet.ServletContextProviderImpl for all Jahia 
portlet deployments?
This seems to be something which is not completely standardized between 
different portal container implementations because I apparently have to 
change this entry if I want to deploy portlets for example in the 
uPortal. Or do I miss here something?

Clemens


Khaled TLILI wrote:
> Hi,
> 
> Jpetsore has been tested with Jahia in order to validate struts-portlet 
> bridge and it looks working well (screenshot in attachemnt, with Jahia 
> 5.0.1).
> 
> I know that there were bugs with struts-bridge portlet that have been 
> fixed.
> 
> You'll find in attachement jpetstore.war with struts-portlet bridge jars 
> that we've tested. Is the same as yours?
> 
> Regards
> KT.
> 
> 
> 
> Clemens Düpmeier a écrit :
>> Hi,
>> I am trying to migrate some struts application into Jahia portlets 
>> using the struts portlet bridge approach.
>> In a first step I tried to install the jpetstore example because the 
>> mailings in this mailing list say that this will be a good example for 
>> such a project.
>>
>> So, the installation of the portlet went well but when I try to 
>> incorporate the portlet into a Jahia web page the following error 
>> message is shown:
>>
>> -------
>> Portlet is Not Available: jpetstore_1.5::JPetstorePortlet
>> Reason: org.apache.jetspeed.container.JetspeedPortletContext cannot be 
>> cast to org.apache.pluto.core.impl.PortletContextImpl
>> -------
>>
>> This seems to be related to a class PortalServletContextProvider which 
>> is implemented in the jpetstore example which return an 
>> PortletContextImpl as return value of the "getServletContext()"  method.
>>
>> --------
>> public class PortalServletContextProvider implements 
>> ServletContextProvider {
>>    public ServletContext getServletContext(GenericPortlet portlet) {
>>       return ((PortletContextImpl) 
>> portlet.getPortletContext()).getServletContext();
>>      }
>>     
>>     ....
>> }
>> ------
>>
>> This seems to be written for integration of jpetstore with the uPortal 
>> and apparently doesn't work with Jahia. What do I have to use as 
>> ServletContextProvider for Jahia? Is there another jpetstore version 
>> which is compatible with Jahia?
>>
>> Thanks in advance
>> Clemens Düpmeier
>>
>> _______________________________________________
>> dev_list mailing list
>> [email protected]
>> http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list
>>
>>   
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dev_list mailing list
> [email protected]
> http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list

_______________________________________________
dev_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list