[Enter] [Course Objectives] [Schedule] [Text] [Grading] [Project]

Lab #4: Java Servlets

Objectives

  1. Define the functions of a web server

  2. Install and use a Java Servlet Interface package

  3. Compile, build and deploy a Java Servlet application

  4. Write servlets

Background Material

0. Text: Chapter 11 [PDF]

1. What is a web server?

2. Sun Servlet Tutorial [PDF]

3. Marty Hall's and Larry Brown's Servlet material
These take awhile to load, but are worth the wait.

4. And yet more

5. Class examples

6. Introduction to Adaptive Hypertext

7. CGI Cookies (See also Lab #2b)

8. PHP cookies (See also Lab #3)

9. Cookies in JavaScript (See also Lab #1)

10. Creating your first JSP page (Or use the web host)

Assignment

0. (2 Points) Create a project specification for your project. Put a link from your Project Description page to this. All project members' names and email addresses MUST be on the Project Specification.

1. (0.5 points) (INDIVIDUAL) You have 2 choices here: a) Use the webhost to compile and execute a servlet. or b) Download and install Tomcat and compile and execute a servlet.

2. a) (0.5 points) (INDIVIDUAL) Write a servlet that returns a randomly chosen greeting from a list of five different greetings. Store servlet works on your computer,

b) (1 Point) Redo 2 a using JSP.

3. a) (0.5 points) Create a Beta Test - that is, a usability test for your project. We will give you feedback before next week when you will make it available.

b) (0.5 points) Add Adaptive Hypertext to your project. You may use cookies, session tracking or any other method you wish. Describe what your adaptive hypertext does (and how you implemented it) on your Project Description page or on your lab page. This is the technological core to your project, so do this well! It is one of the features we will grade on the finished project.

Continue work on your project. For this week, you should try to get your project pretty well complete. If you have a lot of content, try to get as much of this done as possible. Document on your Project Description (blog?) page what is different. Next Lab, people will be looking at your project, and performing reviews (using your beta test!), so you need to make this as complete as possible.

Do the quiz!

Quiz [PDF]

Quiz Solutions [PDF]