Java Reference
In-Depth Information
</TR>
</TABLE
<BR><BR><BR>
<INPUT TYPE="Submit" VALUE="Submit">
</FORM>
</CENTER>
</BODY>
</HTML>
Here's what this initial Web page looks like (without colour!):
Fig. 8.7
Initial Web page for a simple shopping cart application
When a selection has been made and the user has clicked 'Submit', the Selection
servlet is executed. Before we look at the code for this servlet, there is an apparent
minor problem (that turns out not to be a problem at all) that needs to be
considered…
As you are aware by now, a servlet builds up a Web page by outputting the required
HTML tags in string form via method println of class PrintWriter . This means, of
course, that any string literals must be enclosed by speech marks. For example:
println("<HTML>");
Search WWH ::




Custom Search