I call a servlet as the action in a form, from a jsp.
Created May 4, 2012
Alex Chaffee You'll have to pass the JSP's URI in to the servlet, and have the servlet call sendRedirect to go back to the JSP. For example:
<FORM ACTION="/foo/myservlet"> <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="/foo/thisjsp.jsp"> Shoe size: <INPUT NAME="shoesize"> <INPUT TYPE="SUBMIT"> </FORM>Then in the servlet...
response.sendRedirect(request.getParameter("redirect"));