| <?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>Creating servlets</title> | |
| </head> | |
| <body xml:lang="en-us" 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">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"><b>New</b> > <b>Servlet</b></span> from | |
| the pop-up menu.</span> The <b>Create Servlet</b> 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> | |
| <div><div class="relconcepts"><strong>Related concepts</strong><br> | |
| <div><a href="cwservbn.html">Servlets</a></div> | |
| </div> | |
| </div> | |
| </body></html> |