blob: ce1102b689b30291f5f352b03c5de05fdb72000a [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2006, v.4002-->
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
"task.dtd">
<task id="twsrvwiz" xml:lang="en-us">
<title>Creating servlets</title>
<shortdesc>The servlet wizard helps you create <tm tmclass="special" tmowner="Sun Microsystems, Inc."
tmtype="tm" trademark="Java">Java</tm> 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.</shortdesc>
<prolog><metadata>
<keywords><indexterm>servlets<indexterm>creating</indexterm></indexterm></keywords>
</metadata></prolog>
<taskbody>
<context> <p>To create a servlet, complete the following steps: </p></context>
<steps>
<step><cmd>From the J2EE perspective, expand your <xref href="ccwebprj.dita"
scope="peer"><desc></desc>dynamic project</xref> in the Project Explorer view.</cmd></step>
<step><cmd>Right click on the <b>Servlet</b> icon, and select <menucascade>
<uicontrol>New</uicontrol><uicontrol>Servlet</uicontrol></menucascade> from
the pop-up menu.</cmd><stepresult> The <uicontrol>Create Servlet</uicontrol> wizard
appears.</stepresult></step>
<step><cmd>Follow the project wizard prompts.</cmd></step>
</steps>
<postreq><p><b>General Information</b></p><dl><dlentry>
<dt>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>
</dlentry><dlentry>
<dt>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>
</dlentry><dlentry>
<dt>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>
</dlentry><dlentry>
<dt>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>
</dlentry></dl></postreq>
</taskbody>
</task>