i am having one jsp page called department.jsp. In this i am having two tables, first table contains fields like dept id,name etc and two buttons save and clear.
through this save button i am storing the data into the database. The other table is to display the records from db.
Now i need this to be done:
After pressing the save button ,the records will get stored in the db. once it is stored i need this new record also to be updated in the second table
ie. it should to be reload with the newly added records. whether i can achieve this in structs, if so how can i do. help me out in this.
I don't think this is a big issue. When a user presses the save button, do you post the form or make an ajax request to send the data for saving?? If it is an ajax request, then the code that you call, must return the text for the new row and you can use normal DOM manipulation to add that row to the second table. If you post the form on click of the save button, then it is not a problem at all, the next time you display the table, it will get all the records from the database so that record will also come and get displayed in the JSP...