blob: 306dacd9466c6efc4006fee30cae9a00561a6eef [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<body id="cwservbn"><a name="cwservbn"><!-- --></a>
<h1 class="topictitle1">Servlets</h1>
<div><p>Servlets are server-side Java™ programs that use the <cite>Sun Microsystems Java Servlet
API</cite> and its associated classes and methods, as defined in the <cite>Sun
Microsystems Java Servlet 2.3 Specification</cite>. These Java programs
extend the functionality of a Web server by generating dynamic content and
responding to Web client requests. When a browser sends a request to the server,
the server can send the request information to a servlet, so that the servlet
can construct the response that is sent back to the browser.</p>
<p>Just as applets run on a Web browser and extend the browser's capabilities,
servlets run on a Java-enabled Web server, such as the WebSphere<sup>®</sup> Application
Server and extend the server's capabilities. Because of their flexibility
and scalability, servlets are commonly used to enable businesses to connect
databases to the Web.</p>
<div class="p">Although a servlet can be a completely self-contained program, you can
split application development into two portions: <ul><li>The business logic (content generation), which governs the relationship
between input, processing, and output</li>
<li>The presentation logic (content presentation, or graphic design rules),
which determines how information is presented to the user</li>
Using this paradigm, you may choose to have business logic handled by Java beans,
the presentation logic handled by JavaServer Pages (JSP) or HTML files, and
the HTTP protocol handled by a servlet. <div class="note"><span class="notetitle">Note: </span>JSP files can be used to manage
both the presentation and business logic for a Web application. JSP files
use structured markup for presentation, and supply servlet model behavior
at run time.</div>
<p>You can develop, debug, and deploy servlets, set breakpoints within servlet objects, and step through
code to make changes that are dynamically folded into the running servlet
on a running server, without having to restart each time.</p>
<p>For more information about servlets, refer to the <cite>Sun Microsystems Java Servlet
2.3 Specification</cite> at <samp class="codeph"></samp>.</p>
<div><p><b class="relconceptshd">Related concepts</b><br />
<a href="ccwtover.html" title="">Web application overview</a><br />
<a href="cwebdevelopmenttools.html" title="">Web development tools</a><br />
<p><b class="reltaskshd">Related tasks</b><br />
<a href="twsrvwiz.html">Creating Servlets</a><br />