Servlets are commonly used as an efficient platform-independent replacement for Common Gateway Interface (CGI) scripts.
A programmatic point of view:
- a servlet resembles an applet;
- it is an executable that's written in the JavaTM programming language,
- usually (though not always) is executed in response to an invocation from an HTML page.
SERVLET Element:
- Efficient and scalable because [ don't create new processes every time they execute ]
- servlets are handled by separate threads within the Web server process.
- Can write to server log files and can take advantages of other server capabilities [ they run in the server's own process ].
- Designed to fulfill the "Write Once, Run AnywhereTM" [ promise inherent in the Java programming language] .
- Servlets can be executed without modification on any platform.
Diagram: Common ways of using a servlet in Web server environment
A user (1) requests some information by filling out a form containing a link to a servlet and clicking the Submit button (2).
The server (3) locates the requested servlet (4).
The servlet then gathers the information needed to satisfy the user's request and constructs a Web page (5) containing the information.
That Web page is then displayed on the user's browser (6).
note:
Now i remember it~ heeheehee.. -white02
0 comments:
Post a Comment