0
votes

On a JSF page where there are about 5 input fields (some textboxes, dropdown, textarea, radio, etc) and a submit button. On clicking the button, it validates all the input fields based on the value entered.

We are facing a problem with the page. When any of the input fields have a validation error (say, you enter alphabets for the phone number textbox), then in addition to the erroneous field (phone textbox) getting cleared, some of the other fields (say, First Name field) that were filled with correct values and does not have any validation errors are also getting cleared. The application is deployed on a WebSphere cluster environment, having 2 identical servers. The strange part of the problem is that it does not happen all the time. It seems like, that when the application is served up from one of the servers, the problem happens, but when it is from the other server, it does not. Also, noticed that this problem does not happen locally, that is when the application is run on local standalone WebSphere server from IBM RSA IDE.

Please see the screenshot of the problem

JSF 2.2 Mojarra WebSphere ND version 8.5.5.9 IBM Rational® Software Architect for WebSphere Software : Version: 8.5

Can anyone please help me figure out how to solve this. Thank you

1

1 Answers

0
votes

This issue is likely related to your cluster environment and serialization. As a first step, check to see if using client side state saving with JSF resolves the problem:

<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
</context-param>

There is additional WebSphere-specific information relating to JSF and clustering here. You'll want to make sure that javax.faces.SERIALIZE_SERVER_STATE is set to true, and that you don't have any serialization issues.