Java Reference
In-Depth Information
Example
This example involves a simplifi ed electronic ordering system in which the user's
order details are accepted via a form and then displayed back to him/her on a sepa-
rate Web page, with the user being prompted to confi rm those values. (In this artifi -
cial example, the user would need to use the browser's 'back' button to change any
entries.)
Here's the code for the initial Web page ( Order.html ) that passes form input to
our JSP ( Order.jsp ):
<HTML>
<HEAD>
<TITLE>Shopping Order</TITLE>
<STYLE>
body {text-align:center;}
</STYLE>
</HEAD>
<BODY>
<BR><BR>
<H1><P STYLE="color:red">Order Details</P>
</H1>
<BR>
<!-- Pass all form entries to Order.jspā€¦ -->
<FORM METHOD=POST ACTION="Order.jsp">
<TABLE>
<TR>
<TD>Name:</TD>
<TD><INPUT TYPE="text" NAME= "name"></ TD>
</TR>
<TR>
<TD>Address line1:</TD>
<TD><INPUT TYPE="text"
NAME= "addressLine1"></ TD>
</TR>
<TR>
<TD>Address line2:</TD>
<TD><INPUT TYPE="text"
NAME= "addressLine2"></ TD>
</TR>
<TR>
<TD>Address line3:</TD>
<TD><INPUT TYPE="text"
NAME= "addressLine3"></ TD>
</TR>
<TR>
Search WWH ::




Custom Search