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
|
Chapter 11 Examples from Java Servlet
Programming, 2nd Ed
Examples from other chapters:
- Example 11.1 and 11.2: Me gustan burritos / especial del
día
- These two servlets store burrito special of the day deals in
the servlet context. Note that someone else may have already set
the special. Maybe you want to
try the getter first to know if someone did, and when.
- Example 11.3 and 11.4: A search engine
- These two servlets demonstrate how one servlet can performs
a search, then forward the search results to another page for
rendering.
- Example 11.5: Go directly to Home, do not pass Go
- This servlet demonstrates the problems with relative URL handling
by forwarding a request to the home page of this context. Notice
how the URL stays the same and thus relative links are broken.
(Hit Back to return to this page.)
- Example 11.6 to 11.8: Including a catalog item
- This servlet demonstrates how information can be passed to the
called resource using an attached query string or using request
attributes set with the setAttribute() method. The servlet displays
a catalog item by forwarding a Book object to another servlet.
|