Chapter 2 Examples from Java Servlet
- 2-1: A servlet that prints "Hello World"
- 2-3: A servlet that knows to whom it's
saying hello, modified to return quickly in response to HEAD requests
Examples from other chapters:
- Example 2.1: A servlet that prints "Hello World."
- This servlet prints a simple hello world. Note that the book
has an interesting history on the first documented "Hello World!"
- Example 2.3: A servlet that knows to whom it's saying hello,
modified to return quickly in response to HEAD requests
- This servlet uses the request's getMethod() method to improve
performance by detecting HEAD requests in the doGet() method so
that it can return early.