HW6 - CS2a/Sum09
Due: Monday 6/15/2009
-
Create a new template hw6template.servlet which defines a template
that you will use for this homework. The template should have links in a
menubar to the files listed below. An example of this kind of a template
servlet is
demo8.servlet
(or see the source code
demo8.servletV
)
You can copy this code and modify it.
-
hw6.servlet - this is simply an introduction page which explains what the homework is about
-
hw6a.servlet - this servlets computes a formula and generates
a form to get information for that formula. It only computes the formula
if the users have filled out the form. You can have it compute any formula you
want, but make it a non-trivial formula (e.g. multiplying two numbers together is to easy, but calculating a loan payment based on principal, interest, and term is good!).
For example, look at
demo6.servlet
(color coded
demo6.servletV
)
to see an example of this kind of servlet. You can copy this servlet and make
changes...
-
hw6b.servlet - this servlet asks the user for their unetid and the URL of their picture and other information. It then sends email to them and to you thanking them for their participation, and it generates a webpage which contains a CS2a/Sum09 ID card created with HTML and CSS that they can print and cut out. It should be a 2in by 3in card...
An example of a servlet that sends an email is
demo7.servlet
(or see the source code
demo7.servletV)
And an example of a servlet that generates an ID card is
hw6b.servlet
or
hw6b.servletV,
but you should make a nicer looking ID card.
-
hw6c.servlet - create a page which can be accessed from on campus or from off campus with the correct password. If the user does not enter the correct password it should generate a form asking for the password. If they have forgotten the password, it should ask for their unetid and send them an email containing the password and a link back to this page.
Here is an example of a servlet which tests if the user is on campus or using a pw
hw6d.servlet
or
hw6d.servletV
You can have a second form that asks for their email if they have forgotten the
password and sends them an email containing the password. (This might be a little tricky
from what we know at this point.)