CIS336 (also Semester 2 of CIS219, CIS221 and IT226)
Website design, implementation and management
Semester 2, 2006-7

Lectured by David Meredith

Exercises for Workshop 9 (Assessed)

See also alternative exercises for second assessed coursework, which are available here.

(The following exercises are based on various questions on page 428 of "An Introduction to XML and Web Technologies" (Addison-Wesley, 2006) by Anders Møller and Michael Schwartzbach.)

  1. Set up the Apache Tomcat Server on your machine using the detailed instructions provided here. Make sure that you install version 5.5.23. Set the port on which the server listens to 8080. If you fail to get the correct test page, make sure there are no other web servers or application servers running on your machine. For further information, see the file RUNNING.txt in the apache-tomcat-5.5.23 folder.
  2. Save the servlet source code available here to a file on your disk in the correct folder. Make a deployment descriptor and set the servlet mapping so that the servlet will load when the URL "http://localhost:8080/helloworld/hello" is typed into a browser. Zip the contents of the context path directory (i.e., the one under the webapps directory that contains your servlet) and e-mail the zip file to Remember to include your full name in the body of your e-mail message.
  3. Write a servlet that accepts GET and POST requests and outputs as much information about a given request as can be obtained through the HttpServletRequest object. Zip the context path directory and e-mail the zip file to Remember to include your full name in the body of your e-mail message.
  4. The file, students.xml, which is available here, contains information about students and their grades. Write a servlet, Lookup, that, on a GET request, accepts a single parameter named id and returns all information about the corresponding student. Zip the context path directory for your servlet and e-mail it to

You should e-mail your solutions to David Meredith so that he receives them by 6pm on Friday 6th April 2007.