Servlets.com

Home

What's New?

com.oreilly.servlet

Servlet Polls

Mailing Lists

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

The Book
Chapter 2 Examples from Java Servlet Programming, 2nd Ed

  • 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.

 


Home   com.oreilly.servlet   Polls   Lists   
Engines   ISPs   Tools   Docs   Articles   Soapbox   Book

Copyright © 1999-2005 Jason Hunter
Privacy Policy

webmaster@servlets.com
Last updated: March 1, 2009