Professional Java Servlets 2.3

 < Free Open Study > 


Overview

The current version of the Java Servlet API, 2.3, provides a mature technology for developing J2EE and J2SE-based web applications based around servlets.

The entire Servlet API is contained in two packages: javax.servlet and javax.servlet.http. The first package deals with generic servlets, and the second deals with specialized HTTP servlets.

The API contains 20 interfaces and 16 classes. The prevalence of interfaces in the API allows servlet implementations to be customized and optimized to the requirements of a specific servlet container. For example, the API specifies servlet request and response interfaces, but the container provides the underlying class implementations for them. From the container vendors' point of view, this allows it to determine the optimal implementation, given the characteristics and requirements of the container and the clients' requirements for the web application. These could include such objectives as optimization for HTTP access.

As developers, we don't need to know the details of how these classes have been implemented by the container. It is sufficient to be able to access methods within the classes according to the contract specified by the interface.

During the course of this chapter:


 < Free Open Study > 

Категории