JavaBeat
Struts Tutorials | Hibernate Tutorials | JSP Tutorials | Servlet Tutorials | EJB Tutorials | Struts Resources | Spring Resources | Hibernate Resources
Servlets Home Articles Resources Tutorials FAQs Forums  

Servlet Overview

Servlets are the Java platform technology of choice for extending and enhancing Web servers. Servlets provide a component-based, platform-independent method for building Web-based applications, without the performance limitations of CGI programs. And unlike proprietary server extension mechanisms (such as the Netscape Server API or Apache modules), servlets are server- and platform-independent. This leaves you free to select a "best of breed" strategy for your servers, platforms, and tools.

Today servlets are a popular choice for building interactive Web applications. Third-party servlet containers are available for Apache Web Server, Microsoft IIS, and others. Servlet containers are usually a component of Web and application servers, such as BEA WebLogic Application Server, IBM WebSphere, Sun Java System Web Server, Sun Java System Application Server, and others.

Servlet Hierarchy

A servlet is an object that extends either the javax.servlet.GenericServlet class or the javax.servlet.http.HttpServlet class. The javax.servlet.GenericServlet class defines methods for building generic, protocol-independent servlets. The javax.servlet.http.HttpServlet class extends this class to provide HTTP-specific methods.
Servlet Hierarchy

Servlet Interaction

In a typical HTTP servlet environment, a user instigates a session with a servlet by directing a Web browser at a URL that loads a servlet on a server. The browser then communicates a request to the servlet over a socket on port 80. The servlet, listening on port 80, fields the request, extracts any parameters or data from the request, and dispatches the application flow to the appropriate business-logic component to execute one or more tasks. Once the business-logic component has finished executing, it passes its results back to the servlet to be formatted as HTML and passed back to the user’s browser.
Servlet Interaction


 


JavaBeat 2006, India | javabeat home | About Us | partners directory | Advertise with us