4 Replies Latest reply on Jul 16, 2005 1:06 PM by wtff

    xml out of war-file

    Jean-François Van Dam Newbie

      Hi everybody

      I was wondering if some can tell me how to put the web.xml out of the war-file. but still using the web.xml

      My problem is that I have to make 30 different war-files just because my web.xml is different. So it would be nice if I could make 1 war-file and 30 different web.xml and not putting them into the WEB-INF/web.xml.

      Is there a solution that i can use the web.xml en the war-file separated?

      Thx for your help

        • 1. Re: xml out of war-file
          Norman Richards Master

          You can specify an alt-dd on your application.xml, but that just shifts the replacement burden one deployment descriptor higher.

          If you deploy in exploded format, swapping out web.xml files is easy.

          • 2. Re: xml out of war-file
            Jean-François Van Dam Newbie

            thx for your help !!!

            Now i'm a lot futher.

            • 3. Re: xml out of war-file
              briankardell Newbie

              This is actually sort of a common problem... But: Do you really need 50 different web.xml's - and if so - why? Usually the solution to this problem, in my experience, is that just because something can be set up with web.xml doesn't always mean that that is the only - or best way to accomplish.

              • 4. Re: xml out of war-file
                wtff Newbie

                I aggree that the alt-dd mechanism is a fantastic featute. It is of big value in certain situations. For example when an application needs to be deployed to several machines, each time with a different configuration or profile.

                My problem is that I believe JBoss is ignoring the alt-dd element. I had run tests with previous versions of jboss and also checked the 4.0.2 codebase. The J2eeModuleMetaData class parses the alt-dd element and returns the url configured within this element via a method called getAlternativeDD().
                This method is not being invoked by any other jboss class.

                I read a wiki doc which hinted that JBoss 5 will support alt-dd elements via it's virtual filesystem approach.

                Are there any plans to add support for the alt-dd element to the 4.x branch?

                This is an awefully usefull feature and I'm missing it a lot in Jboss. ;)

                Thanks
                Sascha