Check Page Context Request Method : Page Context « JSTL « 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:  JSTLCheckPageContextRequestMethod.zip( 1,225 k)








24.26.Page Context
24.26.1.Set Variable to Page Context
24.26.2.Set Class to Page Context
24.26.3.Query String
24.26.4.Check Page Context Request Method