Search code examples
ajaxjsfprimefacesjsf-2websphere

I'm getting serverError-javax.faces.application.ViewExpiredException in Websphere Dev environment but not getting in my local environment


I'm getting serverError-javax.faces.application.ViewExpiredException in Websphere Dev environment on JSF page using Ajax but not getting in my local environment. The Code is same in both environments. I used IDE for building in my local and I used Maven in Dev. JSF 2.0, WAS 8.5. What could be causing it.

I've looked at similar posts and have implemented various suggestions like making managed bean implement serialized interface etc but no luck. As code is same in both environments could it be related to maven build?

org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION is 20 (default).

I'm supposed to get error message on a field if validation fails but instead it's giving the view expired exception:

<h:inputText styleClass="inputs" id="assessmentStation" size="3" 
        maxlength="3"                                                                                                    
         required="true" requiredMessage="Assessment Station must be entered"
      <p:ajax event="blur" update="assessmentStationMsg"></p:ajax>
</h:inputText>

Solution

  • The issues is resolved by two methods: 1. Changing STATE_SAVING_METHOD to client resolved the issue. 2. There was no session cookie being returned to the browser. We changed to use https and the cookie is being returned and the application is now displaying error messages. We will go with 2 :)