Process Hidden Field : Form Hidden Field « JSP « Java Tutorial






index.jsp

<HTML>
    <HEAD>
        <TITLE>Submitting Hidden Fields</TITLE>
    </HEAD>
 
    <BODY>
        <H1>Submitting Hidden Fields</H1>
        <FORM ACTION="basic.jsp" METHOD="POST">
            <INPUT TYPE="HIDDEN" NAME="HIDDEN" VALUE="Hello from JSP!">
            <INPUT TYPE="SUBMIT" VALUE="Submit">
        </FORM>
    </BODY>
</HTML>

basic.jsp

<HTML>
  <HEAD>
    <TITLE>Reading Hidden Controls</TITLE>
  </HEAD>

    <BODY>
        <H1>Reading Hidden Controls</H1>
        The hidden text is: 
        <% out.println(request.getParameter("HIDDEN")); %>
    </BODY>
</HTML>
  Download:  ProcessHiddenField.zip( 1 k)








23.27.Form Hidden Field
23.27.1.Process Hidden Field