2 Replies Latest reply on May 18, 2010 7:00 PM by tomm

    Deploy root webapp as "ROOT" rather than "ROOT.war"?

    tomm Newbie

      I'm migrating some JBossAS 4.* apps to JBossAS 5.* and for backward compatibility I need to statically deploy the root webapp as "ROOT" rather than "ROOT.war".  Does anyone have any tips on how I can do that?



      Tom M

        • 1. Re: Deploy root webapp as "ROOT" rather than "ROOT.war"?
          Peter Johnson Master

          I don't understand the question because even as far back as 3.2.x (when I first started using JBoss AS) the "root" web app was deployed in a directory named ROOT.war. Of course, the context was always simply '/'. JBoss AS always required the .war suffix so that it could know what type of app it was deploying.


          You can actually deploy a web app by any name and have it's context be '/' (the root context) by adding a <context> entry to the jboss-web.xml file, or by specifying a context in the application.xml file of an EAR.

          • 2. Re: Deploy root webapp as "ROOT" rather than "ROOT.war"?
            tomm Newbie

            Hello Peter,


            I appreciate your reply.  We actually have a backward compatibility requirement on the filesystem directory name "ROOT" where we install our root webapp files, and various apps would break if we were to lay down the files under "ROOT.war".  We've used "ROOT" for years, probably from a version of embedded Tomcat that we started with long ago.  I imagine that it probably worked OK under JBossAS 4.* because of the URLDeploymentScanner, but now that deployment has been reimplemented for JBossAS 5.* the "ROOT" directory doesn't get recognized, which is not surprising.  I'm just looking for some way to manually configure the root webapp to work with the existing "ROOT" directory name.


            Thanks for your time.


            Tom M