Assignment # 4a

Learning Goals for Assignment 4 (all parts)

Project

This assignment is part of your project.

Assignment

In Assignment#3, you developed a servlet to instantiate and populate a Java bean with the data associated with the project registration form. In addition, the servlet invoked an isValid method of the bean to determine if the form data was valid. In Assignment#4, you will extend your servlet to send control to one of two JSPs, depending on the return from the isValid method call.

Assignment 4a is the first of three parts in assignment 4. The three parts of assignment 4 are:

  1. Create a form JSP, and send a redirect (use the sendRedirect method of HttpServletResponse) to the form JSP from your controller servlet. The JSP should populate the form with the data the user previously entered, which is stored in the bean. Your bean should have a scope that outlasts the request object.
  2. Build a testing JSP that displays the attributes of the shared objects, along with data submitted from the browser.
  3. Modify the servlet so that it forwards the request to the form JSP if the data is not valid, and forwards to a congratulations JSP if the data was valid.

Assignment Steps (4a)

Hints