| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE html | |
| PUBLIC "-//IETF//DTD HTML 4.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html><head> | |
| <!-- /******************************************************************************* | |
| * 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 | |
| *******************************************************************************/ --> | |
| <link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css"/> | |
| <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> | |
| <div><div class="relconcepts"><strong>Related concepts</strong><br> | |
| <div><a href="ccwtover.html">Web application overview</a></div> | |
| </div> | |
| <div class="reltasks"><strong>Related tasks</strong><br> | |
| <div><a href="twsrvwiz.html">Creating servlets</a></div> | |
| </div> | |
| </div> | |
| </body></html> |