Hi, there are probably a few ways of doing this. Here's two:
1) response.sendRedirect(req.getHeader("referer"));
This makes use of the referer header which may or may not be there, so it's not reliable all the time.
2) Have the form pass the page it's on as an variable and then use that for redirecting.
This of course could be a security risk so you need to check that the url submitted from the form to your servlet actually is residing on your page 🙂
Good Luck
/johan