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 15 Examples from Java Servlet
Programming, 2nd Ed
- 15-1 and 15-2: A simple servlet to drive
the Hello template
- 15-3: Another approach to WebMacro servlet
design
- 15-5: A context tool for integer arithmetic
- 15-6 to 15-8: Snooping the request with
WebMacro
- 15-9 to 15-12: A Tool application
Examples from other chapters:
- Example 15.1 and 15.2: A simple servlet to drive the Hello
template
- This simple servlet makes use of the WebMacro templating system
to print the
current date and time.
- Example 15.3: Another approach to WebMacro servlet design
- This servlet shows how to write a WebMacro-enabled servlet by
extending the org.webmacro.servlet.WMServlet superclass.
- Example 15.5: A context tool for integer arithmetic
- This shows a simple context tool that performs integer arithmetic.
This MathTool often comes in handy because the WebMacro template
language has been so simplified that it doesnt include even
basic arithmetic operations, although due to popular demand, arithmetic
operations are being added.
- Example 15.6 to 15.8: Snooping the request with WebMacro
- This simple template prints information from the request to
demonstrate the context tools and directives available to WebMacro
templates. The template can be considered standalone
because it uses no servlet-provided variables. Standalone templates
can be viewed with the reusable MacroView servlet set to handle
*.wm requests.
- Example 15.9 to 15.12: A Tool application
- The following application displays a list of the various content
creation tools available. This builds on the example in Chapter 14.
|