You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by axelspin <sp...@knmi.nl> on 2007/05/08 16:54:54 UTC

pluto 1.0.2 MyFaces

Hi

Does someone know if it`is possible to deploy portlet developed with MyFaces
in Pluto 1.0.1/1.0.2

I succeded just with jsf 1.1 

bye
-- 
View this message in context: http://www.nabble.com/pluto-1.0.2-MyFaces-tf3710126.html#a10377417
Sent from the Pluto - User mailing list archive at Nabble.com.


Re: pluto 1.0.2 MyFaces

Posted by Kevin Irmscher <ke...@gmail.com>.
Hi Axel,

thank your for sending the files. I tried to convert a simple JSF
application into a portlet and deploy it in Pluto but I get this
exception when the portlet is called:

Nested Exception is java.lang.ClassCastException:
org.apache.pluto.core.impl.PortletContextImpl
at com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:118)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:104)
at com.sun.faces.portlet.ViewHandlerImpl.renderView(ViewHandlerImpl.java:150)
at ...

It seems to be a problem in Pluto. I'm using Pluto 1.0.1. Did you try
it with a different version?

Regards,
Kevin



On 5/9/07, axelspin <sp...@knmi.nl> wrote:
>
> Hi Kevin.. I am getting some support for Myfaces from a guy at e-science team
> in uk.
> As soon as I have update I`ll give u more info
>
> About jsf 1.1 I used the following conf file (just a sample webapp based on
> spring and hibernate), with jsf portlet bridge 1.1 downloaded here
> https://jsfportletbridge.dev.java.net/public/Download.html
>
> web.xml
> -------------------------------------------------------------------------------------
> <?xml version="1.0"?>
> <!DOCTYPE web-app PUBLIC
>   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>
>     <context-param>
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>         <param-value>server</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>javax.faces.CONFIG_FILES</param-name>
>         <param-value>/WEB-INF/faces-config.xml</param-value>
>     </context-param>
>
>      <!--Loads Spring application context upon application startup.-->
>     <listener>
>       <listener-class>
> org.springframework.web.context.ContextLoaderListener</listener-class>
>     </listener>
>
>     <!-- Faces Servlet -->
>     <servlet>
>         <servlet-name>Faces Servlet</servlet-name>
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>         <load-on-startup> 1 </load-on-startup>
>     </servlet>
>
>
>     <!-- Faces Servlet Mapping -->
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>*.jsf</url-pattern>
>     </servlet-mapping>
>
> </web-app>
> -------------------------------------------------------------------------------------
>
> portlet.xml------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
> version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
> http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" id="QualityControl">
>
>     <portlet id="qualityControl">
>         <description>Station Quality Control</description>
>         <portlet-name>qualityControl</portlet-name>
>         <display-name>Station Quality Control</display-name>
>         <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
>
>         <init-param>
>           <description>Portlet init view page</description>
>           <name>com.sun.faces.portlet.INIT_VIEW</name>
>           <value>/pages/main.jsp</value>
>         </init-param>
>
>         <init-param>
>           <description>Portlet init help page</description>
>           <name>com.sun.faces.portlet.INIT_HELP</name>
>           <value>/pages/help.jsp</value>
>         </init-param>
>
>         <supports>
>             <mime-type>text/html</mime-type>
>             <portlet-mode>VIEW</portlet-mode>
>             <portlet-mode>EDIT</portlet-mode>
>             <portlet-mode>HELP</portlet-mode>
>         </supports>
>
>         <portlet-info>
>              <title>Station Quality Control</title>
>              <short-title>Station Quality Control</short-title>
>         </portlet-info>
>
>     </portlet>
>
> </portlet-app>
> -----------------------------------------------------------------------------------
>
>
> faces-config.xml--------------------------------------------------------------
> <?xml version="1.0"?>
> <!DOCTYPE faces-config PUBLIC
>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
>   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
>
>
> <faces-config>
>
>   <application>
>
> <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
>   </application>
>
>   <navigation-rule>
>    <from-view-id>/pages/main.jsp</from-view-id>
>     <navigation-case>
>      <from-action>#{qualityControlBean.submit}</from-action>
>      <from-outcome>success</from-outcome>
>      <to-view-id>/pages/main.jsp</to-view-id>
>    </navigation-case>
>   </navigation-rule>
>
>
>
>
>   <managed-bean>
>     <managed-bean-name>qualityControlBean</managed-bean-name>
>
> <managed-bean-class>org.neries.orfeus.QualityControl.QualityControlBean</managed-bean-class>
>     <managed-bean-scope>session</managed-bean-scope>
>     <managed-property>
>             <property-name>manager</property-name>
>             <value>#{manager}</value>
>      </managed-property>
>   </managed-bean>
> </faces-config>
> -------------------------------------------------------------------------------------
>
>
>
> Kevin Irmscher wrote:
> >
> > Hi,
> >
> > I'm also trying to deploy JSF portlets in Pluto 1.0.1. but haven't
> > been successful so far. Did you use the portlet bridge or
> > MyFacesGenericPortlet? If possible, could you send or post the
> > configuration files faces-config.xml, portlet.xml and web.xml. Your
> > help will be appreciated.
> >
> > Regards,
> > Kevin
> >
> >>Hi
> >>
> >>Does someone know if it`is possible to deploy portlet developed with
> MyFaces
> >>in Pluto 1.0.1/1.0.2
> >>
> >>I succeded just with jsf 1.1
> >>
> >>bye
> >>--
> >>View this message in context:
> >>http://www.nabble.com/pluto-1.0.2-MyFaces-tf3710126.html#a10377417
> >>Sent from the Pluto - User mailing list archive at Nabble.com.
> >
> >
>
> --
> View this message in context: http://www.nabble.com/pluto-1.0.2-MyFaces-tf3710126.html#a10391374
> Sent from the Pluto - User mailing list archive at Nabble.com.
>
>

RE: pluto 1.0.2 MyFaces

Posted by axelspin <sp...@knmi.nl>.
Hi Kevin.. I am getting some support for Myfaces from a guy at e-science team
in uk.
As soon as I have update I`ll give u more info

About jsf 1.1 I used the following conf file (just a sample webapp based on
spring and hibernate), with jsf portlet bridge 1.1 downloaded here
https://jsfportletbridge.dev.java.net/public/Download.html

web.xml
-------------------------------------------------------------------------------------
<?xml version="1.0"?> 
<!DOCTYPE web-app PUBLIC 
  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 
  "http://java.sun.com/dtd/web-app_2_3.dtd"> 
<web-app> 

    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    
     <!--Loads Spring application context upon application startup.-->
    <listener>
      <listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>    

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup> 1 </load-on-startup>
    </servlet>


    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    
</web-app>
-------------------------------------------------------------------------------------

portlet.xml------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" id="QualityControl">

    <portlet id="qualityControl">
        <description>Station Quality Control</description>
        <portlet-name>qualityControl</portlet-name>
        <display-name>Station Quality Control</display-name>
        <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>

        <init-param>
          <description>Portlet init view page</description>
          <name>com.sun.faces.portlet.INIT_VIEW</name>
          <value>/pages/main.jsp</value>
        </init-param>
        
        <init-param>
          <description>Portlet init help page</description>
          <name>com.sun.faces.portlet.INIT_HELP</name>
          <value>/pages/help.jsp</value>
        </init-param>
        
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>VIEW</portlet-mode>
            <portlet-mode>EDIT</portlet-mode>
            <portlet-mode>HELP</portlet-mode>
        </supports>

        <portlet-info>
             <title>Station Quality Control</title>
             <short-title>Station Quality Control</short-title>
        </portlet-info>

    </portlet>
    
</portlet-app>
-----------------------------------------------------------------------------------


faces-config.xml--------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
  

<faces-config>

  <application>
       
<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
  </application>
  
  <navigation-rule>
   <from-view-id>/pages/main.jsp</from-view-id>
    <navigation-case>
     <from-action>#{qualityControlBean.submit}</from-action>
     <from-outcome>success</from-outcome>
     <to-view-id>/pages/main.jsp</to-view-id>
   </navigation-case>
  </navigation-rule>
   
 
 
 
  <managed-bean>
    <managed-bean-name>qualityControlBean</managed-bean-name>
   
<managed-bean-class>org.neries.orfeus.QualityControl.QualityControlBean</managed-bean-class>    
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
            <property-name>manager</property-name>
            <value>#{manager}</value>
     </managed-property>
  </managed-bean>
</faces-config>
-------------------------------------------------------------------------------------



Kevin Irmscher wrote:
> 
> Hi,
> 
> I'm also trying to deploy JSF portlets in Pluto 1.0.1. but haven't
> been successful so far. Did you use the portlet bridge or
> MyFacesGenericPortlet? If possible, could you send or post the
> configuration files faces-config.xml, portlet.xml and web.xml. Your
> help will be appreciated.
> 
> Regards,
> Kevin
> 
>>Hi
>>
>>Does someone know if it`is possible to deploy portlet developed with
MyFaces
>>in Pluto 1.0.1/1.0.2
>>
>>I succeded just with jsf 1.1
>>
>>bye
>>--
>>View this message in context:
>>http://www.nabble.com/pluto-1.0.2-MyFaces-tf3710126.html#a10377417
>>Sent from the Pluto - User mailing list archive at Nabble.com.
> 
> 

-- 
View this message in context: http://www.nabble.com/pluto-1.0.2-MyFaces-tf3710126.html#a10391374
Sent from the Pluto - User mailing list archive at Nabble.com.