O'Reilly logo

Tomcat 6 Developer's Guide by Damodar Chetty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Servlet lifecycle

The process of adding a wrapper to its context causes the wrapper's start() method to be invoked. A key task of this method is to set its available member to zero.

This member indicates the time (in milliseconds) when a servlet is expected to be ready to serve requests. If this is zero, the servlet is ready and able to serve. If it is a positive value, then the servlet is expected to be available at the specified future time, and requests for it are handled by returning an SC_SERVICE_UNAVAILABLE response. On the other hand, a servlet whose available member is set to Long.MAX_VALUE is considered to be permanently unavailable, and requests are responded to with an SC_NOT_FOUND error.

As we saw in the last chapter, servlets can also ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required