Sun Java System Web Server 7.0 Update 7 Administrator's Guide

ProcedureRunning JWSDP 2.0 samples

  1. Download JWSDP 2.0.

  2. Create a Web Server specific sjsws.props at $JWSDP_HOME/jwsdp-shared/bin.

    A sample sjws.props is provided below. All the fields are mandatory.


    ADMIN_USER=admin
    ADMIN_PORT=8800
    ADMIN_HOST=localhost
    ADMIN_PASSWORD_FILE=/tmp/admin.passwd
    CONFIG=jwsdp
    VS=jwsdp
    WS_HOME=/export/ws7.0
    WS_PORT=5555
    WS_HOST=localhost

    Note –

    The admin.passwd file has the administrator' server password. An example of this entry will be: wadm_password=adminadmin


  3. Modify configuration files.

    Modify build.xml and etc/deploy-targets.xml files of the sample you plan to run. Note that the changes needed in deploy-targets.xml is not sample specific. You should be able to use a master copy and copy it into the etc. directory of the application you plan to run.

    build.xml changes.

    Comment out the Application Server lib.home definition at the top of the build.xml and add the Web Server lib location. The changed build.xml example is shown below:


    <!--
       **                                                         **
       ** Comment out the Application Server lib.home declaration **
       **                                                         **
        <property file="../../../jwsdp-shared/bin/sjsas.props"/>
          <condition property="lib.home" value="${DOMAIN_DIR}/../lib">
            <available file="../../../jwsdp-shared/bin/sjsas.props"/>
          </condition>
        <condition property="lib.home" value="${env.JAXWS_HOME}/lib">
          <not>
            <available file="../../../jwsdp-shared/bin/sjsas.props"/>
          </not>
        </condition>
    -->
    <!--
       ** Add the Web Server library location **
    -->
        <property name="lib.home" value="${WS_HOME}/lib" />

    deploy-targets.xml changes.

    Replace the etc/deploy-targets.xml with a web server specific deploy-targets.xml . This change will deploy the web application to the Web Server . An example of deploy-targets.xml file is shown below:


    <property environment="env"/>
    <!-- Loading Web Server properties -->
    <property environment="env"/>
    <property file="../../../jwsdp-shared/bin/sjsws.props"/>
    <property name="ws.home" value="${WS_HOME}"/>
    <property name="ws.admin" value="${ws.home}/bin/wadm"/>
    <property name="lib.sample.home" value="${basedir}/../lib"/>
    <property name="build.home" value="${basedir}/build"/>
    <property name="build.classes.home" value="${build.home}/classes"/>
    <property name="build.war.home" value="${build.home}/war"/>
    <property name="config" value="${CONFIG}"/>
    
    <target name="deploy">
        <exec executable="${ws.admin}" vmlauncher="true">
          <arg value="add-webapp" />
          <arg value="--user=${ADMIN_USER}" />
          <arg value="--password-file=${ADMIN_PASSWORD_FILE}" />
          <arg value="--host=${ADMIN_HOST}" />
          <arg value="--port=${ADMIN_PORT}" />
          <arg value="--config=${CONFIG}" />
          <arg value="--vs=${VS}" />
          <arg value="--uri=/jaxws-${ant.project.name}" />
          <arg value="${build.war.home}/jaxws-${ant.project.name}.war" />
        </exec>
    
        <antcall target="commit-config" />
    </target>
    
    <target name="commit-config">
        <exec executable="${ws.admin}" vmlauncher="true">
          <arg value="deploy-config" />
          <arg value="--user=${ADMIN_USER}" />
          <arg value="--password-file=${ADMIN_PASSWORD_FILE}" />
          <arg value="--host=${ADMIN_HOST}" />
          <arg value="--port=${ADMIN_PORT}" />
          <arg value="--force=true" />
          <arg value="${CONFIG}" />
        </exec>
    </target>