Monday, January 7, 2008

What is Servlet in Java?

A Servlet is an object that gets a request and makes a response based on that request. The basic servlet package describes the Java objects to signify servlet requests and responses, with objects to reflect the servlet's configuration parameters and execution environment in the program. The package javax.servlet.http describes HTTP-specific subclasses of the generic servlet elements, with the session management objects that track multiple requests and responses involving the Web server and a client. Servlets may perhaps be packaged in a WAR file as a Web application.
Servlets can be generated routinely by JavaServer Pages (JSP), or alternately by template engines for example WebMacro. Often servlets are used in conjunction with JSPs in a sample called "Model 2", which is a flavor of the model-view-controller sample.

No comments: