- A servlet is a small program that runs on a server. The term was coined in the context of the Java applet, a small program that is sent as a separate file along with a Web (HTML) page. Java applets, usually intended for running on a client, can result in such services as performing a calculation for a user or positioning an image based on user interaction.
Some programs, often those that access databases based on user input, need to be on the server. Typically, these have been implemented using a Common Gateway Interface
(CGI) application. However, with a Java running in the server, such programs can be implemented with the Java programming language. The advantage of a Java servlet on servers with lots of traffic is that they can execute more quickly than CGI applications. Rather than causing a separate program process to be created, each user request is invoked as a thread in a single daemon process, meaning that the amount of system overhead for each request is slight.
Instead of a URL that designates the name of a CGI application (in a "cgi-bin" subdirectory), a request in a form on a Web HTML page that results in a Java servlet getting called would call a URL that looks like this:
http://www.whatis.com:8080/servlet/gotoUrl?http://www.someplace.com
The "8080" port number in the URL means the request is intended directly for the Web server itself. The "servlet" would indicate to the Web server that a servlet was being requested.
Add-on modules allow Java servlets to run in Netscape Enterprise, Microsoft Internet Information Server (IIS), and Apache servers.
 |
Learn more about Java Web Services |
| JavaOne: JBoss on SOA middleware, Java EE and data services: Is SOA middleware that different from traditional middleware? At JavaOne, Red Hat's Craig Muzilla ponders that and the future of Java EE and data services. |
| Java One: Mule architect looks to bring REST to SOA: In a conversation at JavaOne, MuleSource's Dan Diephouse, talks about his work on Mule Galaxy, the REST-based open source registry/repository that is going GA later this month. |
| Mule architect sees REST with Atom rising, UDDI fading: Dan Diephouse, the creator of XFire and software architect at MuleSource Inc., discusses the advantages in using REST and the Atom Publishing Protocol. |
| Oracle links SOA, data services, BI and BAM: When it comes to incorporating data services, business intelligence (BI), and business activity monitoring (BAM), Oracle has not lost sight of its database roots. |
| Eclipse, Sun and Oracle team up on persistence API: The surprise announcement from EclipseCon, is Sun Microsystems. selecting the Oracle led EclipseLink project as the reference implementation for the Java Persistence API 2.0. |
| JavaOne news: A collection of SOA and Web services news related articles from the JavaOne conference held in San Francisco. |
| 2006 JavaOne coverage: A compilation of stories written about the JavaOne conference held in San Francisco this past May. |
| Chapter of the week: Security and Ajax: This chapter, excerpted from Ajax in Action, discusses security-related concerns that have particular implications for Ajax. |
| Chapter of the week: Working with Beehive Web services and JSR 181: This chapter, excerpted from Pro Apache Beehive, explores the Web service capabilities that are a part of Apache Beehive. You'll learn about JSR 181, Web Services Metadata for the Java ... |
| Decision time: .NET or J2EE?: How do .NET and J2EE stack up against one another? That depends on who you ask. We've compiled resources from both sides of the fence to help you decide for yourself. |
| LAST UPDATED: |
04 Apr 2005
|
 |
Do you have something to add to this definition? Let us know.
Send your comments to techterms@whatis.com
|

 |
More resources from around the web:
|


');
// -->



|