0 Replies Latest reply on Aug 8, 2014 7:56 AM by Pawan Salwan

    JSF+RICHFACE+ICEFACE intergation

    Pawan Salwan Newbie

      Hi All,

       

      getting below error

       

      I am getting below error

       

      SEVERE: Servlet.service() for servlet Faces Servlet threw exception

      java.lang.IllegalStateException: Illegal attempt to set ViewHandler after a response has been rendered.

        at com.sun.faces.application.ApplicationImpl.setViewHandler(ApplicationImpl.java:563)

       

      I am working on project which is already developed in JSF1.2+Richface3.3 and now adding Icefaces(latest).I need to add ace:datatabe to xhtml UI.In the project we have JSF1.2 +Richfaces3.3 and I  I updated to latest JSF 2.0 and added  "javax.faces" to the project and also update the richfaces to richfaces-api-3.3.4.Final.jar,richfaces-impl-3.3.4.Final.jar,richfaces-impl-jsf2-3.3.3.Final.jar,richfaces-ui-3.3.4.Final.jar and add ICEFAce jars also icefaces.jar,icefaces-ace.jar,icefaces-compat.jar

       

      Faces-config.xml entry are

       

      <faces-config

          xmlns="http://java.sun.com/xml/ns/javaee"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"

          version="2.0">

       

      <!-- Change to "Production" when you are ready to deploy -->

        <context-param>

          <param-name>javax.faces.PROJECT_STAGE</param-name>

          <param-value>Development</param-value>

        </context-param>

       

       

       

        <context-param>

                  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

           <param-value>.xhtml</param-value>

                </context-param>

       

        <context-param>

              <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>

              <param-value>true</param-value>

          </context-param>

       

       

          <context-param>

              <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>

              <param-value>false</param-value>

          </context-param>

         <!-- JSF mapping -->

        <servlet>

          <servlet-name>Faces Servlet</servlet-name>

          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

          <load-on-startup>1</load-on-startup>

        </servlet>

       

        <servlet>

              <servlet-name>Resource Servlet</servlet-name>

              <servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>

              <load-on-startup>1</load-on-startup>

          </servlet>

       

       

          <servlet-mapping>

              <servlet-name>Resource Servlet</servlet-name>

              <url-pattern>/xmlhttp/*</url-pattern>

          </servlet-mapping>

       

      <managed-bean>

      <managed-bean-name>progressBarController</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.controllers.ProgressBarController</managed-bean-class>

        <managed-bean-scope>application</managed-bean-scope>

        <managed-property>

         <property-name>configFilePath</property-name>

         <value>/viexProgressBar.properties</value>

        </managed-property>

      </managed-bean>

       

      <managed-bean>

        <managed-bean-name>progressBarViewHelper</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.ProgressBarViewHelper</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

       

      <managed-bean>

        <managed-bean-name>detailsViewHelper</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.DetailsViewHelper</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

       

      <managed-bean>

        <managed-bean-name>logsViewHelper</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.LogsViewHelper</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

       

      <managed-bean>

        <managed-bean-name>progressBarTableViewHelper</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.ProgressBarTableViewHelper</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

      <managed-bean>

        <description>Data model for progress bar lazy pagination</description>

        <managed-bean-name>progressBarDataModel</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.ProgressBarDataModel</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

        <managed-bean>

        <managed-bean-name>dtaViewHelper</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.DtaViewHelper</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

      <managed-bean>

          <description>Data model for transmittal screen lazy pagination</description>

        <managed-bean-name>dtaJobDataModel</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.DtaJobDataModel</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

      <managed-bean>

        <managed-bean-name>appServicesViewHelper</managed-bean-name>

        <managed-bean-class>com.metavante.viex.progressbar.viewhelpers.AppServicesViewHelper</managed-bean-class>

        <managed-bean-scope>view</managed-bean-scope>

      </managed-bean>

       

      <managed-bean>

        <managed-bean-name>reportsDataTable</managed-bean-name>

          <managed-bean-class>

          com.vectorsgi.viex.profiles.web.controllers.GetReportBean

          </managed-bean-class>

          <managed-bean-scope>#{window}</managed-bean-scope>

      </managed-bean>

       

      <application>

      <!--<view-handler>org.ajax4jsf.application.AjaxViewHandler</view-handler>

        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>-->

        <!--<variable-resolver>org.springframework.web.jsf.SpringBeanVariableResolver</variable-resolver>-->

        <!-- <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver> -->

      </application>

       

       

       

      <servlet-mapping>

          <servlet-name>Faces Servlet</servlet-name>

          <url-pattern>*.xhtml</url-pattern>

        </servlet-mapping>

       

      </faces-config>

       

      web-xml

       

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xmlns="http://java.sun.com/xml/ns/javaee"

      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

          <display-name>VCPP System Monitor</display-name>

          <context-param>

              <param-name>contextConfigLocation</param-name>

              <param-value>

        classpath:applicationContext-monitor-jobs.xml

        classpath:applicationContext-monitor-datasource.xml

        /WEB-INF/applicationContext-config.xml

        /WEB-INF/applicationContext-security.xml

        /WEB-INF/url-roles-config.xml

        </param-value>

          </context-param>

        <context-param>

            <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>

            <param-value>false</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.richfaces.SKIN</param-name>

              <param-value>darkX</param-value>

          </context-param>

         <context-param>

              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

              <param-value>.xhtml</param-value>

          </context-param>

          <context-param>

              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

              <param-value>client</param-value>

          </context-param>

          <context-param>

              <param-name>com.sun.faces.validateXml</param-name>

              <param-value>false</param-value>

          </context-param>

          <context-param>

              <param-name>com.sun.faces.verifyObjects</param-name>

              <param-value>false</param-value>

          </context-param>

          <context-param>

              <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

              <param-value>false</param-value>

          </context-param>

          <context-param>

              <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>

              <param-value>NEKO</param-value>

          </context-param>

          <context-param>

              <param-name>org.ajax4jsf.SKIN</param-name>

              <param-value>classic</param-value>

          </context-param>

          <context-param>

              <param-name>facelets.REFRESH_PERIOD</param-name>

              <param-value>2</param-value>

          </context-param>

        

        <filter>

              <filter-name>xssFilterChain</filter-name>

              <filter-class>com.vectorsgi.vcpp.rr.web.ViexCrossScriptingFilter</filter-class>

          </filter>

             <filter>

              <filter-name>csrfFilterChain</filter-name>

              <filter-class>com.vectorsgi.vcpp.rr.web.CSRFFilter</filter-class>

          </filter>

          <filter>

              <filter-name>springSecurityFilterChain</filter-name>

              <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>

          </filter>

          <filter>

              <filter-name>ReportFilter</filter-name>

              <filter-class>com.vectorsgi.vcpp.rr.web.ReportFilter</filter-class>

          </filter>

          <filter>

              <display-name>Ajax4jsf Filter</display-name>

              <filter-name>ajax4jsf</filter-name>

              <filter-class>org.ajax4jsf.Filter</filter-class>

          </filter>

       

        <filter-mapping>

              <filter-name>csrfFilterChain</filter-name>

              <url-pattern>/*</url-pattern>

          </filter-mapping>

        <filter-mapping>

              <filter-name>xssFilterChain</filter-name>

              <url-pattern>/*</url-pattern>

          </filter-mapping>

          <filter-mapping>

              <filter-name>springSecurityFilterChain</filter-name>

              <url-pattern>/*</url-pattern>

          </filter-mapping>

       

       

          <filter-mapping>

              <filter-name>ReportFilter</filter-name>

              <url-pattern>/report/*</url-pattern>

          </filter-mapping>

          <filter-mapping>

              <filter-name>ajax4jsf</filter-name>

              <servlet-name>Faces Servlet</servlet-name>

              <dispatcher>REQUEST</dispatcher>

              <dispatcher>FORWARD</dispatcher>

              <dispatcher>INCLUDE</dispatcher>

          </filter-mapping>

          <listener>

              <listener-class>com.vectorsgi.vcpp.rr.web.LoggingContextListener</listener-class>

          </listener>

          <listener>

              <listener-class>com.vectorsgi.vcpp.rr.web.EmulatorShutdownContextListener</listener-class>

          </listener>

          <listener>

              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

          </listener>

          <!--

              HttpSessionEventPublisher needs to be registered if concurrent-session-control is being

              used. Session invalidation (logout) will cause an

              org.springframework.security.ui.session.HttpSessionDestroyedEvent to be published via the

              org.springframework.security.ui.session.HttpSessionEventPublisher. This is necessary to

              clean up session context within the spring container.

          -->

          <listener>

              <listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>

          </listener>

          <servlet>

              <servlet-name>RejectRepairServlet</servlet-name>

              <display-name>This is the display name of my J2EE component</display-name>

              <description>This is the description of my J2EE component</description>

              <servlet-class>com.vectorsgi.vcpp.rr.web.RejectRepairServlet</servlet-class>

          </servlet>

          <servlet>

              <servlet-name>ImageServlet</servlet-name>

              <display-name>This is the display name of my J2EE component</display-name>

              <description>This is the description of my J2EE component</description>

              <servlet-class>com.vectorsgi.vcpp.rr.web.ImageServlet</servlet-class>

          </servlet>

          <servlet>

              <servlet-name>Faces Servlet</servlet-name>

              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

              <load-on-startup>2</load-on-startup>

          </servlet>

          <servlet-mapping>

              <servlet-name>RejectRepairServlet</servlet-name>

              <url-pattern>/RejectRepairServlet</url-pattern>

          </servlet-mapping>

          <servlet-mapping>

              <servlet-name>ImageServlet</servlet-name>

              <url-pattern>/ImageServlet</url-pattern>

          </servlet-mapping>

          <servlet-mapping>

              <servlet-name>Faces Servlet</servlet-name>

              <url-pattern>*.xhtml</url-pattern>

          </servlet-mapping>

      </web-app>