Simple servlet that demonstrates the use of packages. Remember to
put this and all remaining Chapter 2 classes in the moreservlets
A utility class that simplifies the generation of the
DOCTYPE and TITLE. Note:
most of the remaining servlets in this chapter use this class.
A servlet that uses the
class. If you get "unresolved symbol" errors when compiling this
servlet, review Section 1.6, especially the CLASSPATH
settings on pages 19 and 20.
Deployment descriptor illustrating how to set servlet initialization
parameters. See Chapter 5
for specific examples of the use of various
web.xml elements, including the setting of initialization
parameters for both servlets and JSP pages.
Simple servlet that reads three parameters from the form data.
Servlet that takes a search string, number of results per
page, and a search engine name, sending the query to
that search engine. Illustrates manipulating
response status codes. Requires the
Small class that encapsulates how to construct a
search string for a particular search engine.
Servlet that sets six cookies: three that apply only to the current
session (regardless of how long that session lasts)
and three that persist for an hour (regardless of
whether the browser is restarted).
Servlet that creates a table of the cookies associated with
the current page.
Same utility class shown earlier. The point here is the
getCookieValue and getCookie
Cookie that persists 1 year. Default cookie doesn't
persist past current session.