8 Replies Latest reply on Jul 24, 2012 12:07 PM by harris804

    Where is ROOT.war in AS 7

    harris804

      As my profile shows I a newbie and in need of help. I've used JBoss 4 and JBoss 5 for some time. To install my application I simply put it an html file into ROOT.war (home\server\default\deploy\ROOT.war in JBoss 5. I would then launch it with http://hostname:8080/directoryname/app.html.

       

      I now need to do the same thing with JBoss AS 7.  There is, however, no ROOT.war directory.  How do I use the default ROOT with AS 7?  I tried creating a ROOT.war folder in jboss-home\standalone\deployments, but that didn't work. There must be more to it. Can someone please tell me what I need to do?

       

      Thanks for any suggestions,

      Randy

        • 1. Re: Where is ROOT.war in AS 7
          saltnlight5

          The JBossAS7 root is served from the static $JBOSS_HOME/welcome-content directory (not a servlet app).

           

          You can still add the ROOT.war into $JBOSS_HOME/standalone/deployments directory, but you must first disable the above first. Go in your "$JBOSS_HOME/standalone/configuration/standalone.xml", then find

           

          <subsystem xmlns="urn:jboss:domain:web:1.1"

           

          and in the section find and set "enable-welcome-root="false" instead of "true".

           

          With that disabled, your ROOT.war should work just as the old days.

          1 of 1 people found this helpful
          • 2. Re: Where is ROOT.war in AS 7
            harris804

            I will try that first thing in the morning. Thank you very much.

            Randy

            • 3. Re: Where is ROOT.war in AS 7
              harris804

              I must be doing something wrong. I edited the standalone.xml in $JBOSS-HOME/standalone/configuration as follows:

               

                      <subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host">

                          <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                          <virtual-server name="default-host" enable-welcome-root="false">

                                   <alias name="localhost"/>

                                   <alias name="example.com"/>

                          </virtual-server>

                        </subsystem>

               

              I then restarted JBoss.  I have in the deployments directory: 

                     ./ROOT.war/otwweb/otw.html

               

              I'm using the URL:

                     http://hostname:8080/otwweb/otw.html

               

              but it comes back with 404 - Page not found.

               

              Any idea what I'm doing wrong?

              Randy

              • 4. Re: Where is ROOT.war in AS 7
                jaikiran

                Do you have a jboss-web.xml which maps the war to a root context?

                • 5. Re: Where is ROOT.war in AS 7
                  harris804

                  jaikiran pai wrote:

                   

                  Do you have a jboss-web.xml which maps the war to a root context?

                   

                  I don't think so.  Where would I find that?

                  • 6. Re: Where is ROOT.war in AS 7
                    saltnlight5

                    Randy,

                    Did your war actually deployed? If your ROOT.war is a directory (exploded war mode), then you need to create an empty file name "ROOT.war.dodeploy" to tell JBossAS to deploy it. I think JBossAS will only auto deploy packaged single .war file only.

                    • 7. Re: Where is ROOT.war in AS 7
                      harris804

                      That sure sounds like my problem. Where would I place that file ROOT.war.dodeploy?

                      • 8. Re: Where is ROOT.war in AS 7
                        harris804

                        That was it, Zemian.  I created the file in the same directory that contained the ROOT.war folder and a message immediately popped up in the window where I had started JBoss - "ROOT.war deployed".

                         

                        Thank you so very much.

                        Randy