4 Replies Latest reply on Nov 20, 2003 7:39 AM by jonlee

    Configuring a default (root) context (again)

    erizzo

      I feel a little incompotent at the moment, but also frustrated that finding out how to do this is proving to be anything but easy. This should be easy, why isn't it?

      Anyway, I have several web apps deployed, but no default context, so I get that ugly page telling me so and listing all my deployed contexts.
      To define a default context, I've tried the recommendations at
      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= none of that has worked. So I'm asking if someone can post exact instructions, including config files and exact locations, that are known to work (ie, tested) for setting a simple default context in JBoss 3.2.1 (using Jetty)? All I need is a standard index.html, nothing complicated.

      TIA,
      Eric

        • 1. Re: Configuring a default (root) context (again)

          I have successfully done it using Tomcat, not sure about Jetty. See if this works for you:

          Create a jboss-web.xml file in your WEB-INF directory with the following contents:

          <?xml version="1.0"?>
          <!DOCTYPE jboss-web>

          <jboss-web>
          <context-root>/</context-root>
          </jboss-web>

          • 2. Re: Configuring a default (root) context (again)
            erizzo

            I'll be damned - that was one of the things I tried without success. But it is doing the trick now. Perhaps I put it in META-INF by accident instead of WEB-INF... I don't know what I did wrong before, but I'm glad you suggested to try it again.
            Actually, I doing it without the DOCTYPE declaration in jboss-web.xml, but I doubt that matters.

            Thanks,
            Eric

            • 3. Re: Configuring a default (root) context (again)
              crepindany

              Does the name of the war file matter?
              Since what version does it work? I'm still using JBoss3.0.4_Tomcat-4.1.12 and it doesn't work.

              • 4. Re: Configuring a default (root) context (again)
                jonlee

                Check the DTD for jboss-web in your system - probably in docs but I can't remember if there was a docs/dtd directory supplied with 3.0.x. According to the jboss-web_3_0.dtd supplied with JBoss 3.2.2, the element should be supported at some point in 3.0.x, I just don't know which version it was introduced.