I want the checkboxes get selected if the value from the database is true and others unchecked and if I select some other check boxes in different pages of the table and submit them they should be stored in database.
The bean class should have boolean property like "isChecked" and setter,getter pair as well. The value attribute will be assigned with unique loginid(please use if have some other unique id) for each checkbox. In selectUser() JS function, you can have logic for maintain the selected checkbox list. On submit form, the selected checkbox list(means uniqueid list) can be set in hidden field and obtain in action class. Below are the code snippets
In case of <input type="checkbox">
subject: How to make checkbox checked in display tag