The definitive place for all the details is the Java Web site at Sun, [3] particularly the pages dealing with javax.servlet.http classes.
[3] http://java.sun.com/j2ee/1.4/docs/api/
Some of the best material on servlets comes from:
Core Servlets and JavaServer Pages by Marty Hall and Larry Brown, ISBN 0-13-009229-0, a Prentice Hall PTR book.
Its sequel, More Servlets and JavaServer Pages by Marty Hall, ISBN 0-13-067614-1, also by Prentice Hall PTR.
Java Servlet Programming, Second Edition by Jason Hunter and William Crawford, ISBN 0596000405, from O'Reilly.