Wednesday, June 15, 2011

Servlet

Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets" on the client side) to answer client requests

Java servlets are becoming increasingly popular as an alternative to CGI(Common Gateway Interface) programs. The biggest difference between the two is that a Java applet is persistent. This means that once it is started, it stays in memory and can fulfill multiple requests. In contrast, a CGI-Common Gateway Interface program disappears once it has fulfilled a request.


It acts as a middlelayer between requests coming from Web browsers or other HTTP clients and databases or applications on the HTTP server. some features are as below

• It is regular Java code. There are new APIs, but no new syntax.

• It has unfamiliar import statements. The servlet and JSP APIs are
not part of the Java 2 Platform, Standard Edition (J2SE); they are a
separate specification (and are also part of the Java 2 Platform,
Enterprise Edition—J2EE).

• It extends a standard class (HttpServlet). Servlets provide a rich
infrastructure for dealing with HTTP.

• It overrides the doGet method. Servlets have different methods to
respond to different types of HTTP commands.

Security is also an important issue related to servlet.


Quickly bookmark the link:
A complete guide to customized j2ee trainning

No comments: