Web Application Components

1. Servlet – A servlet is a web component, managed by a container, that generates dynamic content. Servlets are small, platform independent Java classes compiled to an architecture neutral byte code and can be loaded dynamically into and run by a web server. Servlets interacts with web clients thru a request response paradigm implemented by the servlet container. This model, the request response  is based on the behavior of the Hypertext Transfer Protocol (HTTP).

2. JSP – Java Server Pages are text files that contain text to be output (usually HTML or some such) and special directives, actions, scripting elements, and expressions that are used to generate results dynamically. Java Server Pages are textual components. They go through 2 phases: 1. a translation phase, and 2. a request phase. The Translation is done once per page. Then the request phase is done once per request. The translation phase occurs when Resin takes a look at the JSP page, reads it in, and creates a Servlet. And this needs to be done once only.

(Source:Caucho)

Comments are closed.