0 Replies Latest reply on Mar 29, 2012 7:27 AM by zroc

    myfaces 1.1 jsf 1.2 was 7 with richfaces 3.3.x

    zroc

      Hi there

       

      want to implement rcihfaces components in a was 7 portlet, based on myfaces 1.x + jsf.1.2.

       

      Maven pom extended with richfaces 3.3.x.

       

       

      <?xml version="1.0"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">

       

      <display-name>...-portlet</display-name>
      <description>...</description>

      <!-- Configure tomahawk taglib -->
      <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
      </context-param>

      <!-- Use Documents Saved as *.xhtml -->
      <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
      </context-param>
          <context-param>
              <description>Intervall in Sekunden, in denen der Compiler nach veränderten Seiten scannen soll, für Entwicklung z.B. 2 Sekunden, für Prod später -1, um das Scannen zu deaktivieren</description>
              <param-name>facelets.REFRESH_PERIOD</param-name>
              <param-value>2</param-value>
          </context-param>
          <context-param>
              <param-name>facelets.SKIP_COMMENTS</param-name>
              <param-value>true</param-value>
          </context-param>
      <!-- Special Debug Output for Development -->
      <!--
        <context-param> <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value> </context-param>
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
      </context-param>
      <context-param>
        <description>
         Only applicable if state saving method is "server" (=
         default). Defines the amount (default = 20) of the latest
         views are stored in session.
        </description>
        <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
        <param-value>10</param-value>
      </context-param>
      <context-param>
        <description>
         Only applicable if state saving method is "server" (=
         default). If true (default) the state will be serialized to
         a byte stream before it is written to the session. If false
         the state will not be serialized to a byte stream.
        </description>
        <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <description>
         Only applicable if state saving method is "server" (=
         default) and if
         org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
         default) If true (default) the serialized state will be
         compressed before it is written to the session. If false the
         state will not be compressed.
        </description>
        <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
          <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <description>
         If true, rendered HTML code will be formatted, so that it is
         "human readable". i.e. additional line separators and
         whitespace will be written, that do not influence the HTML
         code. Default: "true"
        </description>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <description>
         If true, a javascript function will be rendered that is able
         to restore the former vertical scroll on every request.
         Convenient feature if you have pages with long lists and you
         do not want the browser page to always jump to the top if
         you trigger a link or button action that stays on the same
         page. Default: "false"
        </description>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <description>
         Validate managed beans, navigation rules and ensure that
         forms are not nested.
        </description>
        <param-name>org.apache.myfaces.VALIDATE</param-name>
        <param-value>true</param-value>
      </context-param>

      <context-param>
        <description>
         Treat readonly same as if disabled attribute was set for
         select elements.
        </description>
        <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
        <param-value>true</param-value>
      </context-param>

      <context-param>
        <description>
         Use the defined class as the class which will be called when
         a resource is added to the ExtensionFilter handling. Using
         StreamingAddResource here helps with performance. If you
         want to add custom components and want to use the
         ExtensionFilter, you need to provide your custom
         implementation here.
        </description>
        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
        <param-value>
         org.apache.myfaces.renderkit.html.util.DefaultAddResource
        </param-value>
      </context-param>

      <context-param>
        <description>
         Virtual path in the URL which triggers loading of resources
         for the MyFaces extended components in the ExtensionFilter.
        </description>
        <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
        <param-value>/faces/myFacesExtensionResource</param-value>
      </context-param>

      <context-param>
        <description>
         Check if the extensions-filter has been properly configured.
        </description>
        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
        <param-value>true</param-value>
      </context-param>

      <context-param>
        <description>
         Define partial state saving as true/false.
        </description>
        <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
        <param-value>false</param-value>
      </context-param>
          <context-param>
              <param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
              <param-value>true</param-value>
          </context-param>

      <!-- <context-param>
        <description>
              </description>
        <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
        <param-value>.util.ErrorRedirektPageHandler</param-value>
      </context-param> -->

        <context-param>
              <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
              <param-value>com.sun.facelets.FaceletViewHandler</param-value>
          </context-param>
         
           <context-param>
              <param-name>org.ajax4jsf.SKIN</param-name>
              <param-value>DEFAULT</param-value>
          </context-param>
          <context-param>
                      <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
              <param-value>true</param-value>
          </context-param>
          <filter>
              <filter-name>extensionsFilter</filter-name>
              <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
              <init-param>
                  <description>Set the size limit for uploaded files.
                      Format: 10 - 10 bytes
                              10k - 10 KB
                              10m - 10 MB
                              1g - 1 GB
                  </description>
                  <param-name>uploadMaxFileSize</param-name>
                  <param-value>100m</param-value>
              </init-param>
              <init-param>
                  <description>Set the threshold size - files
                          below this limit are stored in memory, files above
                          this limit are stored on disk.

                      Format: 10 - 10 bytes
                              10k - 10 KB
                              10m - 10 MB
                              1g - 1 GB
                  </description>
                  <param-name>uploadThresholdSize</param-name>
                  <param-value>100k</param-value>
              </init-param>
          </filter>
          <filter>
              <display-name>RichFaces Filter</display-name>
              <filter-name>richfaces</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>
          </filter>
          <filter-mapping>
              <filter-name>richfaces</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
          </filter-mapping>
          <filter-mapping>
              <filter-name>extensionsFilter</filter-name>
              <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
          </filter-mapping>
          <filter-mapping>
              <filter-name>extensionsFilter</filter-name>
              <url-pattern>/faces/*</url-pattern>
          </filter-mapping>
         

      <!-- 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>*.faces</url-pattern>
      </servlet-mapping>

      <!-- Welcome files -->
      <welcome-file-list>
        <welcome-file>einstieg.xhtml</welcome-file>
      </welcome-file-list>

      </web-app>

       

       

      When i try to deploy on was (with or without web.xml richfaces filter) i get this error:

       

      012-03-29 11:24:07,619 ERROR Abstract...myFacesPortlet.java(240) [U00GIEN] PortletException

      javax.portlet.PortletException: doBridgeDispatch failed:  error from Bridge in executing the request

      at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:509)

      at javax.portlet.faces.GenericFacesPortlet.doRenderDispatchInternal(GenericFacesPortlet.java:461)

      at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:231)

      at .......Abstract....MyFacesPortlet.doView(Abstract....MyFacesPortlet.java:234)

      at .....doView(ProvisionabfuehrungPortlet.java:62)

      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)

      at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:202)

      at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:128)

      at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:183)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:120)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:573)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114)

      at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doRender(PortletServletCollaborator.java:71)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)

      at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doRender(RRDServerPortletServletCollaborator.java:123)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)

      at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doRender(CacheCollaborator.java:92)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)

      at com.ibm.wps.pe.pc.waspc.core.impl.PortletServletCollaboratorImpl.doRender(PortletServletCollaboratorImpl.java:156)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:273)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)

      at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doDispatch(PortletServletCollaborator.java:143)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)

      at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doDispatch(RRDServerPortletServletCollaborator.java:60)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)

      at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doDispatch(CacheCollaborator.java:74)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)

      at com.ibm.wps.pe.pc.waspc.core.impl.PortletServletCollaboratorImpl.doDispatch(PortletServletCollaboratorImpl.java:121)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.dispatch(PortletServlet.java:208)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.service(PortletServlet.java:165)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)

      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)

      at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)

      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)

      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)

      at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)

      at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)

      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:214)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:78)

      at com.ibm.ws.portletcontainer.cache.PortletInvokerCacheCollaborator.doRender(PortletInvokerCacheCollaborator.java:58)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:67)

      at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.invoke(PortletInvokerPerformanceCollaborator.java:313)

      at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doInvoke(PortletInvokerPerformanceCollaborator.java:101)

      at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.invokePMI(PortletInvokerPerformanceCollaborator.java:163)

      at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doInvoke(PortletInvokerPerformanceCollaborator.java:91)

      at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doRender(PortletInvokerPerformanceCollaborator.java:74)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:67)

      at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerIm

       

      thx,

       

      niko