-
Notifications
You must be signed in to change notification settings - Fork 0
Add User
staypufd edited this page Jan 23, 2015
·
5 revisions
The goal of this homework assignment is to be able to add a user to the database (DBManager) and then have that user show up in the user list and login as well. This is much like the login form in many ways, but also requires interacting with the domain to create a user and with the database manager class to store that user.
You will be extending the SimpleSecureWebsite we did in class on Tuesday.
You will need to do the following:
- Add a link to go to a AddUserServlet
- Have the servlet go to a AddUser.jsp from it's doGet method
- Have the AddUser.jsp display a form that will allow you to enter all the data needed to call the User constructor. (See the login.jsp and don't forget the hidden action field)
- Have the AddUserServlet handle the doPost from the AddUser.jsp and get the data passed in form the parameters and then create a User instance.
- Save the new user instance to the DBManager
- Have the doPost method redirect to the listpeople page of the site. (Note we went over redirects in class. If you don't remember, read about them in your book or online.
- Use Bootstrap to style and format your JSP page to look good and provide useful help texts, etc. by using the Bootstrap CSS classes and components (look at the top menu on the site to get to those pages that discuss them).
Bootstrap site