Home
What's
New?
com.oreilly.servlet
Servlet
Polls
Mailing
Lists
List
Archives
Servlet
Engines
Servlet
ISPs
Servlet
Tools
Documentation
Online
Articles
The
Soapbox
"Java
Servlet
Programming,
Second Edition"
"Java
Enterprise
Best Practices"
Speaking
& Slides
About
Jason
XQuery
Affiliate
Advertising
Info
|
Chapter 2 Examples from Java Servlet
Programming
- 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!"
program.
- 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.
|