Get Form Parameter By Index : Form Post « JSP « Java Tutorial






<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
  <head>
    <title>Property Access</title>
  </head>

  <body>
    <c:if test="${pageContext.request.method=='POST'}">
    <c:set var="idx" value="name" />

    param.name = 
    <c:out value="${param.name}" />

    <br />

    param[name] = 
    <c:out value="${param[idx]}" />

    <br />
    </c:if>

    <br />

    <form method="post">Please enter your name? 
    <input type="text" name="name" />

    <input type="Submit" />

    <br />
    </form>
  </body>
</html>
  Download:  GetFormParameterByIndex.zip( 1,246 k)








23.26.Form Post
23.26.1.Get Form Parameter Enumeration
23.26.2.Get Form Parameter By Index
23.26.3.Form Calculator
23.26.4.Process the Form action in the save page
23.26.5.Use multiple forms
23.26.6.Get submit button value