6

Dear All, I have a form with multi submit buttons like this

<FORM NAME="form1" METHOD="POST" Action="SomePage.jsp">
        <INPUT TYPE="SUBMIT" NAME="submit" VALUE="Button 1">

        <INPUT TYPE="SUBMIT" NAME="submit" VALUE="Button 2">

        <INPUT TYPE="SUBMIT" NAME="submit" VALUE="Button 3">
    </FORM>

How can i get the submit value using JSP ?

hind
  • 131
  • 2
  • 3
  • 7

1 Answers1

12

It's just by its name available as request parameter as well.

String submit = request.getParameter("submit");

See also:


That said, a JSP is the wrong place to postprocess a form submit. Use a Servlet.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555