//File: index.html
<HTML>
<HEAD>
<TITLE>Submitting Hidden Fields</TITLE>
</HEAD>
<BODY>
<H1>Submitting Hidden Fields</H1>
<FORM ACTION="formAction.jsp" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="HIDDEN" VALUE="Hello from JSP!">
<INPUT TYPE="SUBMIT" VALUE="Submit">
</FORM>
</BODY>
</HTML>
//////////////////////////////////////////////////////////////////////
//File: formAction.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>
|