Creating SIP servlets

Use the New SIP Servlet wizard to create a Session Initiation Protocol (SIP) servlet. A SIP servlet is a Java-based application component that performs SIP signaling and is run by a Java-enabled SIP application server.

Before you begin

Before you create a SIP servlet, you must complete these tasks:
Tip: On the SIP preferences page (Window > Preferences > SIP), ensure that Always update the deployment descriptors is selected so that the Web deployment descriptor (web.xml) is updated with the new servlet that you create.

Procedure

To create a SIP servlet:

  1. In the Enterprise Explorer view, right-click the project where you want to add a SIP Servlet, and then click New > Other.
  2. Open the SIP folder, click SIP Servlet and then click Next.
  3. On the first page of the wizard, either enter a Java package and class name, or select an existing servlet class or JSP, and click Next. Typically, the superclass is javax.servlet.sip.SipServlet.
  4. On the second page of the wizard, enter deployment information such as the description, initialization parameters, and any servlet mappings.
    Screen shot of second page of Create SIP Servlet wizard for SIP 1.0.
    For SIP 1.1 servlets, you have the option to select the servlet as the main servlet.
    Screen shot of second page of Create SIP Servlet wizard for SIP 1.1.
    Click Next.
    Tip: You can change deployment information later by using the deployment descriptor editor.
  5. On the final wizard page, specify the modifiers, interfaces, and method stubs you want to generate and click Finish.
  6. If you are prompted to update the Web deployment descriptor, click Yes.
    Tip: If you click No, or if you turned off the preference to always update the deployment descriptors, then you can update the Web deployment descriptor (web.xml) file later. (Right-click the sip.xml file and click SIP Operations > Update web.xml).

Results

The wizard creates the new servlet in the specified source folder and opens it in the Java editor.

Feedback