blob: 6168cca467654746bdfa1794774cd2ec0993106c [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="task" name="DC.Type" />
<meta name="DC.Title" content="Creating servlets" />
<meta name="abstract" content="The servlet wizard helps you create Java servlets by walking you through the creation process and by providing you with output files that you can use or that you can modify for use with your Web application. The servlets can run on J2EE-compliant Web servers." />
<meta name="description" content="The servlet wizard helps you create Java servlets by walking you through the creation process and by providing you with output files that you can use or that you can modify for use with your Web application. The servlets can run on J2EE-compliant Web servers." />
<meta content="servlets, creating" name="DC.subject" />
<meta content="servlets, creating" name="keywords" />
<meta content="XHTML" name="DC.Format" />
<meta content="twsrvwiz" 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>Creating servlets</title>
</head>
<body id="twsrvwiz"><a name="twsrvwiz"><!-- --></a>
<h1 class="topictitle1">Creating servlets</h1>
<div><p>The servlet wizard helps you create Java™ servlets by walking you through the
creation process and by providing you with output files that you can use or
that you can modify for use with your Web application. The servlets can run
on J2EE-compliant Web servers.</p>
<div class="section"> <p>To create a servlet, complete the following steps: </p>
</div>
<ol>
<li class="stepexpand"><span>From the J2EE perspective, expand your <a href="ccwebprj.html" title="">dynamic project</a> in the Project Explorer view.</span></li>
<li class="stepexpand"><span>Right click on the <strong>Servlet</strong> icon, and select <span class="menucascade">
<span class="uicontrol">New</span> &gt; <span class="uicontrol">Servlet</span></span> from
the pop-up menu.</span> The <span class="uicontrol">Create Servlet</span> wizard
appears.</li>
<li class="stepexpand"><span>Follow the project wizard prompts.</span></li>
</ol>
<div class="section"><p><strong>General Information</strong></p>
<dl>
<dt class="dlterm">Modifiers</dt>
<dd>You can select a modifier in the wizard to specify whether your servlet
class is public, abstract, or final. Note that classes cannot be both abstract
and final.</dd>
<dt class="dlterm">javax.servlet.Servlet</dt>
<dd>Although javax.servlet.Servlet is provided as the default interface, you
can use the wizard to add additional interfaces to implement.</dd>
<dt class="dlterm">Interface selection dialog</dt>
<dd>This dialog appears if you elect to add an interface to your servlet.
As you type the name of the interface that you are adding, a list of available
interfaces listed in the Matching types list box updates dynamically to display
only the interfaces that match the pattern. You should choose an interface
to see the qualifier, and then click OK when finished.</dd>
<dt class="dlterm">Method stubs</dt>
<dd>You can select any appropriate method stubs to be created in the servlet
file. The stubs created by using the Inherited abstract methods option must
be implemented if you do not intend to create an abstract servlet. Note that
this is not true for Constructors from superclass</dd>
</dl>
</div>
</div>
</body>
</html>