I am doing a project using javaservlets,java beans and jsp pages. I have a customer master form (HTML Or JSP) with input text fields and few buttons for insert,delete,first,next,previous,last.
I have a servlet which will take 'post' request from jsp page when one of these buttons clicked and calls the relavant functions which were implemented in java bean.
My Problem is, I want to display the relevant records in the data input form whenever the user clicks next,previous,delete buttons... etc.
For example, When the user clicks next button , the values in the data input fields should show the next customer record. I am able to pick the correct record from the bean to servlet but how can i replace the existing customer record values with the next customer record values in my data input form. I would like to know how you would implement this if they come across such a requirement.
I am assuming that you are inserting the bean in the session and reading the bean from session on the jsp.
As you said you are getting the right bean into the servlet, after once you have the bean in the servlet replace this new bean in the session and then forward your request to your jsp then your Jsp will be automatically reloeaded with the data from new bean. (use struts if possible , will make your life easy)