The Execution of Java Servlets

Java servlets are instances of a Java class that operate as a Web component. They are invoked to manage an HTTP request and can optionally generate a response to the request.

Java servlets operate within a container, an operating environment for the component which provides various services. This container is usually provided by the Web server or application server.

The design of the servlet environment reflects the stateless nature of HTTP. The servlet is essentially stateless; there is no guarantee that any instance members of the servlet class will retain their values from one client invocation to the next, so client session information should not be stored in servlet instance members. Java servlets do provide ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.