1 Reply Latest reply on Dec 5, 2008 8:10 AM by sam shan

    RichFaces Portlet's problem when cookies are disabled

    sam shan Newbie

      Hi,

      We are using <a4j:support> as shown below

       <h:inputText value="#{bean.dto.text}">
       <a4j:support event="onkeyup" eventsQueue="beantext" reRender="rep" ajaxSingle="true"></a4j:support>
       </h:inputText>
       <h:outputText value="#{bean.dto.text}" id="rep"></h:outputText>
      


      This is a simple use of aj4 support as given in demo (example will echo the words entered in text box). This works fine when browser cookies are enabled. But it gives ViewExpiredException when cookies are disabled as shown below

      
      javax.faces.application.ViewExpiredException: viewId:/index.jsp - View /index.jsp could not be restored.
       com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
       com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
       com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      


      Whether cookies need to be enabled in the browser for RichFaces to work properly?

      We are using the following product
      JBoss AS 4.2.3 GA
      JBoss Portal 2.6.6 GA
      Mojarra 1.2_09-b01-BETA1
      JBoss Portlet Bridge 1.0.0 B4
      RichFaces 3.2.2 GA

      We done 2 test cases and their details are shown below

      1st Test Case:
      Settings done:
      We enabled cookies in the server side (by setting cookies=true in context.xml of jboss-web.deployer). We disabled cookies in the browser end and as mentioned in https://jira.jboss.org/jira/browse/RF-2135 we added the context param facelets.BUILD_BEFORE_RESTORE in web.xml.
      Result:
      Functionality working fine in IE6 and gave ViewExpiredException in Mozilla.

      2st Test Case:
      Disable cookies in server side. As mentioned in https://jira.jboss.org/jira/browse/RF-2135 we added the context param facelets.BUILD_BEFORE_RESTORE in web.xml.
      Result:
      Gives ViewExpiredException in both the browser

      Please help us in knowing the behavior of RichFaces/JBoss Portlet Bridge with respect to cookies in browser.