Assignment # 4c
Learning Goals
- Understand how to include html in a JSP when the html is common to other pages.
- Understand how to forward control between server modules.
Project
This assignment is part of Project#1.
Assignment
In Assignment#3, you developed a servlet to instantiate and populate a Java bean with the data associated with the Sun registration
form. In addition, the servlet invoked an isValid method of the bean to determine if the form data was valid. In Assignment#5, you will extend
your servlet to send control to one of two JSPs, depending on the return from the isValid method call.
Assignment 4c is the third of three parts in assignment 4. The three parts of assignment 4 are:
- Create a form JSP and send a redirect (http header value) to the form JSP from your controller servlet. Your bean should have a scope that
outlasts the request object.
- Build a testing JSP that displays the attributes of the shared objects, along with data submitted from the browser.
- 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 (4c)
- Extend your "congratulations" JSP so that it displays the same header and footer found on the Sun form. The header and footer
should be in a separate file, and be included in the "congratulations" JSP.
- Modify the controller servlet so that you transfer control with a forward instead of a redirect.