Due Friday, November 2, 2012 at 11pm.
Please build a web page, at /default/index/
(so the controller is called index
in the default controller). The web page must display a form to enter data for shipping a product. The form should contain the following fields, with the following validations:
If the form contains errors, you should re-display it with some indication of the errors.
If the form does not contain any error, you should redirect to another page /default/output/
, where you show:
Name
Address 1
Address 2
State, ZIP
Phone
Density (this means, weight / (width * height * length))
To transfer the information from /default/index/
to /default/output/
, you can use the session information as explained in the book. Precisely, in the index
controller you can do, before redirecting to /default/output/
:
session.addr_name = ...
session.address1 = ...
session.address2 = ...
...
session.density = ...
And then in the output controller you can use session.addr_name, session.address1, ..., session.density
to retrieve those values.