Jakarta Servlet

This package includes session management objects that track multiple requests and responses between the web server and a client.

Servlets can maintain state in session variables across many server transactions by using HTTP cookies, or URL mapping.

In general, when using JSPs, embedding Java code in JSP is considered bad practice.

While the direct usage of servlets to generate HTML (as shown in the example below) has become rare, the higher level MVC web framework in Jakarta EE (Faces) still explicitly uses the servlet technology for the low level request/response handling via the FacesServlet.

A somewhat older usage is to use servlets in conjunction with JSPs in a pattern called "Model 2", which is a flavor of the model–view–controller.

This was the first alpha of the Java Web Server (JWS; then known by its codename Jeeves)[11] which would eventually be shipped as a product on June 5, 1997.

[12] In his blog on java.net, Sun veteran and GlassFish lead Jim Driscoll details the history of servlet technology.

[13] James Gosling first thought of servlets in the early days of Java, but the concept did not become a product until December 1996 when Sun shipped JWS.

The Servlet1 specification was created by Pavni Diwanji[17][18] while she worked at Sun Microsystems, with version 1.0 finalized in June 1997.

Life of a JSP file