1

I have recently uploaded my first JSF site using openshift.

I have a command button as follows on my JSF site:

 <h:commandButton id="submitProduct3" image="images/vouchericon.png" 
                        action="#{UserBean.clearInfo()}" value="product1"   />

Which is linked to a bean:

    public String clearInfo()
  {
    String pageReturn = "inputForm";

this.firstName = null;
this.lastName = null;
this.addressLine1 = null;
this.addressLine2 = null;
this.city = null;
this.county = null;
this.country = null;
this.postCode = null;
this.email = null;
this.paypalEmail = null;
this.voucherCode = null;

return pageReturn;
 }

This works fine in both IE, Firefox and Chrome on my localhost and in Firefox and Chrome on openshift but when I click the button on IE once the site is live i get the following error:

An Error Occurred:
viewId:/tabletsHome.xhtml - View /tabletsHome.xhtml could not be restored.
+- Stack Trace
javax.faces.application.ViewExpiredException: viewId:/tabletsHome.xhtml - View     /tabletsHome.xhtml could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
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:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
at java.lang.Thread.run(Thread.java:679)

Please help!

Thanks

EHarpham
  • 602
  • 1
  • 17
  • 34
  • What's the URL / context path of your app? IE has the strange problem that it doesn't properly manage cookies when the context path contains special characters. – BalusC May 30 '12 at 13:40
  • I read about this. I am using openshift so my URL is http://myapp-mydomain.rhcloud.com/mysite/ – EHarpham May 30 '12 at 15:10
  • The context path is the `/mysite` part in your URL example. Doesn't it contain special characters? Anyway, you may want to check the cookie traffic using webdeveloper toolset (press F12 in IE9). Views are by default stored in session and hence session needs to be maintained. See also http://stackoverflow.com/questions/3642919/javax-faces-application-viewexpiredexception-view-could-not-be-restored/3642969#3642969 – BalusC May 30 '12 at 15:11
  • the site is /HouseholdElectricals/tvHomes.xhtml – EHarpham May 30 '12 at 15:12

1 Answers1

0

HHHmmmm my guess is that it might be the Apache proxy in front of Jboss on openshift (HAProxy). That would strike me as the only difference between your local instance and the OpenShift instance. Are you running JBoss locally?

TheSteve0
  • 3,530
  • 1
  • 19
  • 25