This sample has:
- An input form for Web site visitors to enter their data
- A servlet that stores the data in the database
- A page that is returned when a user profile is successfully created
- A page that is returned if this person already has a user profile
- A servlet file that provides information about the servlet to the WebSphere Application Server
The input form contains data entry fields for four of the variables in the UserProfile class. The userName is the unique identifier for this person and is the only required field on this form. When you fill in the form and click Submit, it invokes the Java servlet.
The servlet checks to see if the userName already exists.
If it does, the servlet returns a page asking the user to try
another userName. Otherwise, the servlet creates a new instance
of the UserProfile in the database for this unique userName, initializes
the fields with the data provided, and returns a page that says
"Thanks".
|