We use JSF2, we have a page with form fields with command button linked to backing bean.
When we access the form page, enter the values and submit, the backing bean recieves the correct values and takes it to the next page. If I press back button in the browser, it takes to previous page with form. If I enter new values in the form and submit, the backing bean still recieves the old values in Step 1.
This is odd. Perhaps your bean is put in the session scope and/or the browser has requested the page from the cache. To start, you’d like to disable browser cache for all dynamic pages by a filter which sets the proper response headers.
Map this filter on the servlet name of the
FacesServletor on the same URL pattern.Last, but not least, do not put your form beans in the session scope. Put them in the request or view scope.