handling every thing on the serverside. just use a single form and submit the entire data. take the required data elements in the
servlet based on submit button and redirect to final page on server.(this is ineffecient). but no other possibility.
------------------------------
<form ... action="redirect.class">
<input type=submit name="a">
<input type=submit name="b">
every submit button has a name. use it in servlet to find which submit is called.
do the job of javascript in redirect servlet. and redirect to the required servlet or
jsp.