Objective:
- Students understand MVC 2 in development. Place the code correctly in Model, View and Controller
- Students understand and practice again how to redirect, forward from controller to view.
- Pull the prj301-demo4.
- Review the code to see the changes of filenames:
- login.html is changed to login.jsp
- XXServlet is change to XXController
- Develop the LoginController which check username and password. If username and password are correct, REDIRECT to
/student
(StudentController), else FORWARD tologin.jsp
- The
login.jsp
gets the error from LoginController to show in Login form.
- SUBMIT YOUR SCREENSHOTS:
14.1 Login screen when you enter wrong user name and password
14.2 LoginController.java
14.3 login.jsp
- Implement file StudentController which check parameter
action
, ifaction
islist
, retrieve Student list and transfer tostudentlist.jsp
- Implement file studentlist.jsp to render the student list
- SUBMIT YOUR SCREENSHOTS:
15.1 List of Student screen
15.2 StudentController.java
15.3 studentlist.jsp