Reference no: EM132850291
All of your classes should exist in a webd4201.lastnamefirstinitial package (all lowercase).
Be sure that you ZIP up your lastnamefirstinitial folder that is in the Tomcat/webapps folder, with a copy of your source code (i.e. your Eclipse src folder) and SQL scripts (in a sql folder) placed inside of it.
Any other compression schemes other than *.zip will be penalized. This *.zip file should be submitted into DC Connect on or before the due date.
Be sure that your generated html conforms to XHTML 1.0 Strict compliance; you must include the clickable image when compliance is met.
Database Requirements:
You are to continue to use a PostgreSQL database that runs on port 5432 (default), named webd4201_db that is owned by a user named webd4201_admin that has a password of webd4201_password
Your database should be preloaded with tables for Users and Students
Create a new UserDA.java class that has methods for initialize(), terminate(), plus the four (4) CRUD methods. NOTE: all statements in this file should be PreparedStatements. Add methods in the User.java class to map to these new UserDA.java methods.
Modify the StudentDA.java class so that User related database functionality is removed (it is now in the UserDA.java class). Modify the existing create() method so that that the User and Student INSERT is handled as a database transaction (i.e. if the User INSERT fails do not continue with the Student INSERT attempt, if the User INSERT succeeds but the Student INSERT fails, rollback the entire transaction). NOTE: all statements are to be PreparedStatements in the StudentDA.java class
Servlet Requirements:
Create an appropriately named servlet that will retrieve data from a form, do appropriate data validation, send user back to the register.jsp if there are errors (valid data should be sent back to make the registration form "sticky".
If there are no errors, hashthe password and INSERTing a User and Student record (using today's date for enrolDate and lastAccess and type = ‘s' and enabled = true), the new Student should should be loaded on the session and re-directed to dashboard.jsp.
web.xml Requirements:
Map a servlet (class and URL pattern) to the above servlet
*.jsp Requirements:
Create a register.jsp page that has a <form> to that submits to the URL pattern mapped in web.xml. The form should have inputs for all User and Student attributes, except for user type, enabled, enrol date and last access.
NOTE: if someone is logged in (i.e. there is a Student object on the session), they should be re-directed off the page with an appropriate message.
This page should be "sticky".
Attachment:- classes Deliverable.rar