WHAT IS JAVA SERVLETS ?
An HTTP servlet can generate an HTML page, either when the servlet is accessed explicitly by name, by following a hypertext link, or as the result of a form submission. An HTTP servlet can also be embedded inside an HTML page, where it functions as a server-side include. Servlets can be chained together to produce complex effects--one common use of this technique is for filtering content. Finally, snippets of servlet code can be embedded directly in HTML pages using a new technique called JavaServer Pages.
Servlets : A servlet is dynamically loaded module that services requests from Web server, by another service called response. Servlet is efficient as it is initialized only once when the web server loads it.
JDBC : The JDBC is a pure JAVA API used to execute SQL statements.
It provides the classes and interfaces that can be used by developers to write database applications. Basic JDBC interaction, its simpler form is divided into four steps:
1. Open a connection to the database.
2. Execute a SQL statement.
3. Process the result.
4. Close the connection to the database.
The servlet API:
Through Servlet API we use to create HTTP servlets and any other kind or servlets. Servlet use classes and interfaces from two packages: javax.servlet and javax.servlet.http.
The javax.servlets contains classes to support generic , protocol-independent servlets. These classes are extended by the classes in the javax.servlrt.http packages to add HTTP specific functionality.