I have a set up with stuts2. I have a paginated page which is result of a form submitted by a user. This form bean is used to perform the search and results are shown as per the page size. when user clicks next, all the values entered by the user needs to be available for the search. To solve this i am thinking of storing the bean object in the session, so that every time user clicks next, user entered values can be read from the session.
Is this the right approach to maintain the values? is there better way to handle such situation in struts 2?
I have a set up with stuts2. I have a paginated page which is
Share
That’s a fine way to store search parameters for paginating results.
You might just be able to resubmit them every time, too; it depends on how you’re handling your pagination. Resubmitting (instead of session) allows the (easier) use of multiple windows/tab, which may not be a concern.