We use
Struts framework in our application that has lot of
JSP pages.
What ever the user enters in those pages are saved in the session and at the last page, the user has an option to save everything to the database.
Now, we have to provide a Save button on every page, so that the user can save the data entered in that screen (and in the previous screens) to the database.
What is the best approach to acheive this? I was thinking of creating a separate page containing this Save button and including it in all the pages (lets call it as Save.jsp). But there are 2 issues
i) When I click the Save button in Save.jsp, I don't want the form in the Save.jsp to get submitted, rather I want to submit the contents of the enclosing page.
ii) The enclosing page has some Javascript validations, and those validations should happen when I click on the Save button in the Save.jsp
Or is there any better way to get this done?
Thanks