Results 1 to 3 of 3

Thread: Multiple instances of a WAR on DM Server

  1. #1
    Join Date
    Jun 2005
    Posts
    18

    Default Multiple instances of a WAR on DM Server

    Hi,
    I was wondering if this is possible and if so, how to do it. I have two plan files and each has a web module. This web module will create a servlet in the web.xml file. Is there a way to pass servlet name as a property from the plan file (possibly via a configuration artifact).

    I would like to do something like:

    http://localhost:8080/myweb/....

    and have the second one come up as

    http://localhost:8080/myweb-instance2/.....

    and not have to keep changing the web module I am deploying but rather a property or property file in the plan. The web module I use is very simple (straight forward @Controller stuff, with simple jsp).

    Any help or suggestions appreciated.

    ~Patsy

  2. #2
    Join Date
    Dec 2005
    Location
    Philadelphia, PA, USA
    Posts
    228

    Default

    If you wrap your war in a plan - you can use attributes to rewrite manifests.

    For example:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <plan name="war1" version="${project.version}" scoped="false" atomic="true"
          xmlns="http://www.springsource.org/schema/dm-server/plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.springsource.org/schema/dm-server/plan http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">
    <artifact type="bundle" name="bundle.bsn" version="[${version}, ${version}]">
            <property name="header:Web-ContextPath" value="one"/>
        </artifact>
    </plan>
    Last edited by dsklyut; Feb 23rd, 2010 at 04:20 PM.
    Thanks
    Dmitry

  3. #3
    Join Date
    Jun 2005
    Posts
    18

    Default

    Hi Dmitry,
    thanks a lot. That solved my problem

    ~Patsy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •