1 Reply Latest reply on Apr 22, 2004 7:59 AM by adrian.brock

    "context-root is not unique" Error

    dsinclair

      Hey JBoss users -
      i have some existing Tomcat servlets which i am switching over to JBoss. i am trying to make the JBoss URL's match to their Tomcat counterparts. the URL's currently are (under tomcat) -

      .../servlet/FileServer?key=value
      .../servlet/ImageServer?key=value

      Under JBoss, they are

      .../FileServer/FileServer?key=value
      .../ImageServer/ImageServer?key=value

      i tried switching context-root to "/servlet" in my application.xml files. This gives me the correct URL, however:
      i can only do this for one script at a time! when i do this for both scripts, i get the following error:

      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (java.lang.IllegalArgumentException: addChild: Child name '/servlet' is not unique)

      Is there any way to get both of these servlets to have /servlet as the beginning of their URL? i really need the URL's to stay the same, or other code will be broken.
      Any help will be greatly appreciated.

      - Davy

        • 1. Re:

          The /servlet type deployments are a very old way of doing it.

          I believe it has been deprecated in the spec (meaning it will go away in the future).

          IIRC, the invoker servlet that handles these deployments is not configured by
          default - see jbossweb-tomcaxx.sar/web.xml

          But I'd suggest you migrate away from this usage.