SWE 432 Homework 8
Fall 2008
Servlet: CMS Data Entry & Page Creation: Due 11/0 (two weeks)
The reason some people don't recognize opportunity is because
it often comes disguised as hard work.
- ???
Convert your Java program from homework 7
into a servlet.
The servlet should have two parts.
For part one,
the HTML form from homework 5
will be created dynamically.
For part two,
your servlet will accept the form data
and create a course schedule page with the data provided.
-
Create the HTML form dynamically using doGet().
This means you will no longer need the HTML file to enter data.
Of course, you may change your form from homework 5 anyway you wish.
I strongly advise you to get this part working first before
going to the next part.
There is very little programming,
but this step will allow you to learn how to
deploy your first servlet.
-
Accept the form data with doPost().
Then respond through the res object
with a fully formatted course schedule page
using the data provided.
This homework assignment can be done with one partner.
If you work with a partner,
submit the assignment on both websites
and have both names on your program.
Submission
Submit the program by
(1) placing a link on your class web site
to the servlet executable file on Hermes
and
(2) by emailing the Java source file to the TA.
Both must be submitted before the deadline to be on time.
IMPORTANT PROCESS CONSTRAINTS:
- The name of your servlet must start with your user name
(e.g., upraphamH8.java).
- Make sure your last name is on every HTML page and programming
artifact so we know who it belongs to - even if we print.
- If you finish the assignment late,
you need to send email to me and the TA
to tell us when to grade it.
Hints
- Create the input HTML page (doGet()) first.
Then create the HTML response page from the form data.
The goals are to
separate the tasks and do the simple parts first.
- Check the names of your form data fields carefully;
it's easy to get them wrong, and hard to find the mistake.
- If your HTML uses any other files (.jpg, .js, .css, etc),
be sure to reference these with complete URLs.
- One debugging strategy is to print intermediate results
to a local file.
(The file must be writable by tomcat.)
You can also print intermediate results on the response page once
your program can create it.