Java Servlets, an introduction

We’ve been talking a lot about Linux lately. Let’s break out a bit from that and talk about another topic — the Java Servlet Technology. We’ll try to cover some basic aspects of Java Servlet Technology and may be a little more.

To give you a basic idea, Servlets are the server side components that are the Java counterpart to dynamic web content technologies like CGI, PHP and ASP.NET.

A lot of techniques have been developed to overcome the problems associated with Common Gateway Interface (CGI) and Servlets lie among them. Now, if you’re unsure of the problems associated with CGI then you need to move back to the early days of the Web. In the early days of Web, a server could construct a page dynamically but a separate process was required to handle each request, separate processes were required to read the data from the HTTP request and to write the data to the HTTP response, separate processes were required to communicate with the database. All these activities required a lot of server resources and hence, resulted in the development of programs that were not able to deliver the expected performance.

Continue reading