SE452: Homework [24/24] Previous pageContents

Complete the following tasks:

  1. Create a new Context in your Tomcat server.xml file for your coursework this quarter. Name it after your DePaul id. Mine, for example, would be mwright1. At a minimum, set the path, docBase, debug, and reloadable attributes. Feel free to play around with these as well.
  2. Create your webapp directory according to the instructions in the notes, or reference the Tomcat documentation for details. Add the WEB-INF directory, and the classes directory in WEB-INF, etc.
  3. Create a valid web.xml file.
  4. Write a servlet that reads initialization parameters and writes valid html. It should read in at least two parameters and do something interesting with them. For example, you could read in a parameter (remember it's a string) and use it to loop a certain number of times based on the parameter. Or, you could parse a date entered as a parameter, and change the look of the page based on how far that date is from today. The servlet should also be in a package. (se452.depaulid, where depaulid is your id used to login to campusconnection, mwright1 in my case)
  5. Make sure your servlet handles both GET and POST requests.
  6. Edit web.xml so your servlet is called by a url that doesn't contain the word "servlet" and is not the same name as your servlet class name.
  7. Create a simple index.html file and place it at the root of our webapp. Provide a link in this file to run your test servlet, along with a little description of what the user will see when it is executed.
  8. Place the class file and source file in the correct location in WEB-INF and test your servlet. When you are done, zip the entire webapp (in my case, the mwright1 directory) and post it in the COL submission area. Name the zip file the same as your userid (ex. mwright1.zip).
  9. Make sure to comment your source appropriately, including @author and other appropriate javadoc tags.

Grading Breakdown:

ItemPoints
Context File10
web.xml settings10
index.html10
Webapp structure10
Coding style, javadoc10
Proper Submission10
Servlet functionality40
Total:100

Questions or problems? Try posting a question to the Discussion forum on the DL web site.

Previous pageContents