Jsp Code For Button Submit - Jsp
How to use submit button in jsp?
Snippet Code
Jsp submit button allows you to submit your content on different programs through clicking the submit button. The sample jsp code given below helps you create a submit button.
<HTML>
<HEAD>
<TITLE>JSP code for button submit</TITLE>
</HEAD>
<BODY>
<%
if(request.getParameter("submit") != null) {
%>
You clicked
<%= request.getParameter("submit") %>
<%
}
%>
<FORM NAME="form1" METHOD="POST">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Button 1">
</FORM>
<FORM NAME="form2" METHOD="POST">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Button 2">
</FORM>
<FORM NAME="form3" METHOD="POST">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Button 3">
</FORM>
</BODY>
</HTML>
Tags