2 Replies Latest reply on Mar 28, 2011 12:12 PM by judy guglielmin

    HOW TO CORRECTLY INTEGRATE ICEFACES WITH SEAM???

    andrea andrea Newbie

      Hi,
      I can not find a clean and precise guidance in order to integrate these two systems. Can you help me please? Thank you


      My first error is:




      java.lang|.StringIndexOutOfBoundsException: String index out of range: -1
              a|t java.lang.String.substring(String.java:1937)
              at com.icesoft.faces.application.D2DViewHandler.getActionURL(D2DViewHandler.java:302)
              at org.jboss.seam.ui.util.ViewUrlBuilder.<init>(ViewUrlBuilder.java:25)
              at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:48)
              at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
              at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:489)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
              at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
              at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
              at com.icesoft.faces.context.View$2$1.respond(View.java:48)
              at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
              at com.icesoft.faces.context.View$2.serve(View.java:77)
              at com.icesoft.faces.context.View.servePage(View.java:149)
              at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:67)
              at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
              at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
              at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
              at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
              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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              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.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
              at java.lang.Thread.run(Thread.java:662)
      




      thank you!!

        • 1. Re: HOW TO CORRECTLY INTEGRATE ICEFACES WITH SEAM???
          andrea andrea Newbie

          OPS.. I FORGOT MY CONFIGURATION FILE...


          web.xml




          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.5"
              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-app_2_5.xsd">
            
              <!-- Seam (using Icefaces) generated project-->
              
              <!-- listeners required for this application --> 
             <listener>
                <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
             </listener>
              
             <listener>
                <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
             </listener>
               
           <!-- filters -->
              <servlet>
                  <servlet-name>Seam Resource Servlet</servlet-name>
                  <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
              </servlet>
              
              <servlet-mapping>
                  <servlet-name>Seam Resource Servlet</servlet-name>
                  <url-pattern>/seam/resource/*</url-pattern>
              </servlet-mapping>
              
              <filter>
                  <filter-name>Seam Filter</filter-name>
                  <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
              </filter>
          
              <filter-mapping>
                  <filter-name>Seam Filter</filter-name>
                  <url-pattern>/*</url-pattern>
              </filter-mapping>
              
              <!-- JSF -->
               
             
             <!-- Facelets development mode (disable in production) 
             <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>server</param-value>
             </context-param>
              -->
             <context-param>
                <param-name>facelets.DEVELOPMENT</param-name>
                <param-value>true</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>com.icesoft.faces.actionURLSuffix</param-name>
                  <param-value>.seam</param-value>
              </context-param>
          
              <context-param>
                  <param-name>com.icesoft.faces.synchronousUpdate</param-name>
                  <param-value>false</param-value>
              </context-param>
          
              <context-param> 
                  <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
                   <param-value>true</param-value>
              </context-param> 
          
              <context-param>
                  <param-name>com.icesoft.faces.standardRequestScope</param-name>
                  <param-value>true</param-value>
              </context-param>
             
             <context-param>
                  <param-name>com.icesoft.faces.concurrentDOMViews</param-name>
                  <param-value>true</param-value>
              </context-param>
          
                  <!--  this is only for JBoss AS 6 - it contains JSF RI 2.0.2 which has a bug 
                    Remove this if you have upgraded to 2.0.3      
              <context-param>
                <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
                <param-value>Mojarra-1.2</param-value>
             </context-param>-->  
                 
            <!-- servlets -->
             <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>Persistent Faces Servlet</servlet-name>
                  <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
                  <load-on-startup> 1 </load-on-startup>
              </servlet>
              <servlet>
                  <servlet-name>Blocking Servlet</servlet-name>
                  <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
                  <load-on-startup> 1 </load-on-startup>
              </servlet>  
              
          
          <!-- servlet mappings -->
             <servlet-mapping>
                  <servlet-name>Persistent Faces Servlet</servlet-name>
                  <url-pattern>*.seam</url-pattern>
               </servlet-mapping>
          
               <servlet-mapping>
                  <servlet-name>Persistent Faces Servlet</servlet-name>
                  <url-pattern>/xmlhttp/*</url-pattern>
              </servlet-mapping>
              
              <!-- Blocking Servlet Mapping -->
              <servlet-mapping>
                  <servlet-name>Blocking Servlet</servlet-name>
                  <url-pattern>/block/*</url-pattern>
              </servlet-mapping>
                       
              <session-config>
                  <session-timeout>10</session-timeout> 
              </session-config>    
          
          
          </web-app>




          and Faces-config





          <?xml version='1.0' encoding='UTF-8'?>
          <!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>
           
                <view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
             </application>
             
             
          
            
          </faces-config>





          • 2. Re: HOW TO CORRECTLY INTEGRATE ICEFACES WITH SEAM???
            judy guglielmin Novice

            Assuming that you have also posted on the ICEfaces forum (looks like it anyways).  For specific ICEfaces questions, it is quickest to post there.  If your (similar) post is not there already, please inform.
            Please check out the icefaces example in the seam distribution bundle and if you have tried seam-gen (Seam-2.2.x with ICEfaces-1.8.2) with the ICEfaces option, that would be the quickest way to get up and running.