blob: 3ab7815ec19286b79509692e0a77c5087c6e3f65 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2006 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 http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2006" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="Servlets" />
<meta content="servlets, overview, dynamic content" name="DC.subject" />
<meta content="servlets, overview, dynamic content" name="keywords" />
<meta content="XHTML" name="DC.Format" />
<meta content="cwservbn" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Servlets</title>
</head>
<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 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>
</ul>
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>
</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">java.sun.com/products/servlet/download.html</samp>.</p>
</div>
</body>
</html>