There is more that we haven't discussed, so if you're going to do some serious work with servlets, be sure to do some additional reading, especially on these topics:
The servlet lifecycle and the need for thread safety.
How to keep the servlet output from being cached.
Dealing with failures.
Initialization parameters.
Other kinds of output.
Sharing between servlets.
How to configure and deploy servlets (this is coming up in the next chapter).