SE452: Homework Assignment [20/20] Previous pageContents

Create an HTML form that submits a POST request to a new servlet. The form should contain text fields, check boxes, radio buttons, and combo or list boxes. At least one control should allow multiple selections.

Name the file form.html, and place it in the default directory of your webapp.

Write a new servlet that will handle the POST request (and a GET request, like in HW1). The servlet should read and do something with each request parameter. Examples could be performing a calculation with the data, or displaying it in a certain format. The output needs to be dependent on the input data, not the same every time. Be creative!

Finally, when submitting the homework, do the following:

  1. Make sure that JAVA_HOME/bin directory is in your path (if you type jar at the command line and get an error message, then your PATH isn't set right. You will need to run something like
    set PATH=%PATH%;%JAVA_HOME%\bin
    on Windows, or export PATH=$PATH:$JAVA_HOME/bin in bash or ksh
  2. Open a command window
  3. Change to the TOMCAT_HOME/webapps/myapp directory, where myapp is your DePaul ID
  4. run the command jar cf myapp.war * (where myapp is your DePaul ID. For detail on the jar command, see the JDK tools docs)
  5. Send me the .war file as an email attachment

Questions or problems? Send me an email or post to the Discussion forum on the DL web site.

Previous pageContents