The following sections describe how to use Eclipse to develop SIP Servlets for use with Oracle Communications Converged Application Server:
This document provides detailed instructions for using the Eclipse IDE as a tool for developing and deploying SIP Servlets with Oracle Communications Converged Application Server. The full development environment requires the following components, which you must obtain and install before proceeding:
Building a SIP Servlet produces a Web Archive (WAR file or directory) as an end product. A basic SIP Servlet WAR file contains the subdirectories and contents described in Figure 10-1.
Follow these steps to set up the development environment for a new SIP Servlet project:
The sections that follow describe each step in detail.
In order to deploy and test your SIP Servlet, you need access to a Oracle Communications Converged Application Server domain that you can reconfigure and restart as necessary. Follow the instructions in Create an Administrative Domain in the Installation Guide to create a new domain using the Configuration Wizard. When generating a new domain:
The latest versions of Eclipse use the version 1.5 JRE by default. Follow these steps to configure Eclipse to use the version 1.4.2 JRE installed with Oracle Communications Converged Application Server:
BEA_HOME
/jdk160_05
directory and click OK.Follow these steps to create a new Eclipse project for your SIP Servlet development, adding the Oracle Communications Converged Application Server libraries required for building and deploying the application:
Follow these steps to create an Ant build file that you can use for building and deploying your project:
build.xml
and click Finish. Eclipse opens the empty file in a new window.myDomain
and myApplication
.<?xml version="1.0" encoding="ISO-8859-1"?>
<project default="all">
<property environment="env"/>
<property name="beahome" value="${env.BEA_HOME}"/>
<target name="all" depends="compile,install"/>
<target name="compile">
<mkdir dir="WEB-INF/classes"/>
<javac destdir="WEB-INF/classes" srcdir="src" debug="true" debuglevel="lines,vars,source">
<classpath>
<pathelement path="${weblogic.jar}"/>
</classpath>
</javac>
</target>
<target name="install">
<jar destfile="${beahome}/user_projects/domains/myDomain
/applications/myApplication
.war">
<zipfileset dir="WEB-INF" prefix="WEB-INF"/>
<zipfileset dir="WEB-INF" includes="*.html"/>
<zipfileset dir="WEB-INF" includes="*.jsp"/>
</jar>
</target>
</project>
build.xml
file and save your changes.build.xml
file is valid by selecting Window->Show View->Ant and dragging the build.xml
file into the Ant view. Correct any problems before proceeding.build.xml
file you created.BEA_HOME
variable. The BEA_HOME
variable must point to the home directory of the Oracle Communications Converged Application Server directory. For example:
The build.xml
file that you created compiles your code, packages the WAR, and copies the WAR file to the /applications
subdirectory of your development domain. Oracle Communications Converged Application Server automatically deploys valid applications located in the /applications
subdirectory.
In order to debug SIP Servlets, you must enable certain debug options when you start Oracle Communications Converged Application Server. Follow these steps to add the required debug options to the script used to start Oracle Communications Converged Application Server:
StartWebLogic.cmd
script for your development domain.set JAVA_OPTIONS=
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=9000,server=y,suspend=n
%DEBUG_OPTS%
variable in the place indicated below:"%JAVA_HOME%\bin\java" %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% %DEBUG_OPTS%
-Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER%
-Dweblogic.management.password=%WLS_PW%
-Dweblogic.management.server=%ADMIN_URL%
-Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" weblogic.Server