Servlet basics:
· Servlet basically introduced by sun Microsystem.
· Servlets provide a component-based, platform-independent method for building Web-based applications, without the performance limitations of CGI programs. Servlets have access to the entire family of Java APIs, including the JDBC API to access enterprise databases.
· A Servlet is a specialized Java class that runs on a web server.
· Servlets work on a request - response programming model i.e. they accept requests from the clients, generate responses dynamically and send the responses in a format such as html to the clients/browsers.
A Servlet’s Job:
· Read explicit data sent by client(form data)
· Read implicit data sent by client(request headers)
· Generate the results
Servlets:
F. For executing the servlets, the web server requires the help of another piece of software called as servlet container.
Unlike a Java client program, a servlet has no staticmain()method. Therefore, a servlet must execute under the control of an external container.
Note:
Tomcat Servlet Container is popularly used with Apache Web Server. However, since Tomcat can handle HTML, Servlets and JSP, only Tomcat can be installed and used even without installing Apache web server.
Although Servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers.
. For such applications, Java Servlet Technology defines HTTP-specific Servlet classes.
s
Comments
Post a Comment