The Create Servlet dialog appears.
1. Complete the Create Servlet dialog as follows:
|
Figure 122: Create Servlet dialog. |
Either specify: Java Package: Specify the name of the package where the servlet class servlet is located. Class name: Specify the name of the servlet class. Superclass: javax.servlet.http.HttpServlet appears as the superclass which the servlet class extends by default . Or: Click the radio button beside Use existing Servlet class and specify the name of the Servlet class to use in the Class name field or click Browse to search for it. |
Click Next.
A second Create Servlet dialog appears.
2. Complete the Create Servlet dialog as follows:
|
Figure 123: Create Servlet dialog two. |
Name: Name of the Servlet saved in the web.xml file. Description: Optionally, specify a description of this servlet to appear in the web.xml file. Initialization Parameters: Click Add to specify initialization parameters as name-value pairs. URL Mappings: Click Add to create a URL mapping relative to the application mapping used to access this servlet. |
Click Next.
A third Create Servlet dialog appears.
3. Complete the Create Servlet dialog as follows:
|
Figure 124: Create Servlet dialog two. |
Modifiers: Specify the class modifiers to apply to the Servlet class Interfaces: Specify any additional interfaces that this servlet implements in addition to the default, javax.servlet.Servlet. Which methods stubs would you like to create: Specifies which method stubs to create for the Servlet, including constructors from the superclass, inherited abstract methods, init, toString, getServletInfo, doGet, doPost, doPut, doDelete, doGet, destroy. |
Click Next.
The Servlet Handler dialog appears.
4. Complete the Servlet Handler dialog as follows.
|
Figure 125: Servlet Handler dialog. |
Configure the parameters for the request: Optionally, click Add to specify any information required to call this servlet. Click in each of the fields to specify the parameter Name and Default value. To edit or remove a parameter, click on it and click the appropriate button. To change the order of a parameter in the list, click on it and then click up or down. |
Click Next.
The Data Source Attributes dialog appears.
5. Complete the data source as described in the Creating a Data Source section of this document.
6. Click Finish.