Working with Servlets

A servlet is a server-side component (Java class) that is deployed, executed, and managed by a J2EE-compliant Web container (Web server). A servlet handles HTTP requests and provides HTTP responses, usually in the form of an HTML, XML, or text document.

Servlets are most effectively used for implementing presentation logic and generating binary content such as images. A servlet in the Web tier allows a Web client (browser) to indirectly interact with EJB business logic.

Servlets are portable and non-transactional Java components, which run in servlet engine (container) that can run on any operating system or hardware. They are analogous to the applets that are used on the client container (Web browser). Servlets are the ...

Get Sams Teach Yourself EJB in 21 Days 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.