Read Hidden Control in Same File : Form Input Data « JSP « Java Tutorial

    <TITLE>Reading Hidden Controls</TITLE>

        <H1>Reading Hidden Controls</H1>
            String text = "";
            if(request.getParameter("TEXT1") != null) {
                out.println("The hidden text is:" + request.getParameter("TEXT1")); 
                text = request.getParameter("TEXT1");
        <FORM ACTION="basic.jsp" METHOD="POST">
            <INPUT TYPE="TEXT" NAME="TEXT1">
                VALUE="<%= text%>">
            <INPUT TYPE="SUBMIT" VALUE="Set Hidden Text">
  Download: 1 k)

23.25.Form Input Data
23.25.1.Use Loop to Read Form Controls
23.25.2.Use For Each to Loop Through all Values Passed in by Form
23.25.3.Read Hidden Control in Same File
23.25.4.Pass Form Value to Bean
23.25.5.Form with Error Checking