Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.3 KB

ex04.md

File metadata and controls

46 lines (27 loc) · 1.3 KB

Exercise 4

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.

Milestone 14: Implement MVC for Login function

  1. Pull the prj301-demo4.
  2. Review the code to see the changes of filenames:
    • login.html is changed to login.jsp
    • XXServlet is change to XXController

  1. Develop the LoginController which check username and password. If username and password are correct, REDIRECT to /student (StudentController), else FORWARD to login.jsp

  1. The login.jsp gets the error from LoginController to show in Login form.

  1. SUBMIT YOUR SCREENSHOTS:
    14.1 Login screen when you enter wrong user name and password
    14.2 LoginController.java
    14.3 login.jsp

Milestone 15: Implement MVC for Student function

  1. Implement file StudentController which check parameter action, if action is list, retrieve Student list and transfer to studentlist.jsp

  1. Implement file studentlist.jsp to render the student list

  1. SUBMIT YOUR SCREENSHOTS:
    15.1 List of Student screen
    15.2 StudentController.java
    15.3 studentlist.jsp