Java Reference
In-Depth Information
allows the user to select a favorite color. Don't forget to include functionality
that allows the user to logout. Use (or extend) the UserBean class as the
model, but include a persistence mechanism (either a local file or a
database) so the servlet can save its state. Remember that when a JSP page
contains an HTML form, the servlet has to contain the logic for responding
to submissions from that form. For form-based web applications like this
one, a helpful technique is to include a HTML hidden field in each form that
assigns a unique name to the form or the page, so that the controller servlet
can determine what form data is being submitted and decide how to handle
the submission.
18-5. Package the Portal servlet you created in Exercise 18-4 into a WAR file,
along with the JSP pages and any other auxiliary files it requires. Use that
WAR file to deploy your portal independently of the other examples from
this chapter.
Search WWH ::




Custom Search