8 Replies Latest reply on Jan 8, 2013 2:25 AM by jfclere

    Global web.xml configuration

    lambeths

      In JBoss 4.2.3 we could configure items in

       

      [jboss_server]/deploy/jboss-web.deployer/conf/web.xml

       

      which would be adopted by all applications deployed.  We've used this to configure context params, servlets, and default tag files.

       

      We have dozens of apps deployed in war files, and this a very handy tool.

       

      How is this accomplished in JBoss 7.1.1?  I've googled and searched but can't seem to find the solution.

       

      Thanks,

      Scott

        • 1. Re: Global web.xml configuration
          nickarls

          I'm not aware of any "überdescriptors" that would apply on a higher then per-application basis

          • 2. Re: Global web.xml configuration
            lambeths

            That's unfortunate.  I guess we're only upgrading to 6.1 now, because this configuration is still possible in that version.  I'll have to re-enginneer for these solutions I guess.

            • 3. Re: Global web.xml configuration
              ssilvert

              Maybe you should put in a feature request at https://issues.jboss.org/browse/AS7.  Or better yet, contribue the feature yourself.  You could write a subsystem that adds things every web app.  Should be pretty straightforward.

               

              Stan

              • 4. Re: Global web.xml configuration
                nickarls

                Are there any other descriptor files that could benefit from this functionality? How about a global ejb-jar.xml where you could bind a certain interceptor to all EJBs? How should these template xml files be managed and how should one configure your application so that it doesn't get these descriptions merged in? I wouldn't mind a "global template subsystem" (empty by default)

                • 5. Re: Global web.xml configuration
                  lambeths

                  That's a good idea... although, being that this was available in all previos versions of JBoss, it makes me wonder if the architects of JBoss7 left it out on purpose.  Perhaps there are more desirable techniques for what I'm trying to accomplish.

                  • 6. Re: Global web.xml configuration
                    ssilvert

                    I don't remember the reason it was left out, but I do know that one of the AS7 goals was to have all global configuration in a single file.  That's why I suggested a subsystem.  It would make all the settings configurable through DMR/CLI and editable in config files like standalone.xml.

                     

                    Another option would be to add the web settings to the web subsystem, ejb settings to the ejb subsystem, etc.

                    • 7. Re: Global web.xml configuration
                      jaikiran

                      I moved this to JBossWeb forum. Maybe someone there might know more about the reason for not having similar functionality as a  server level web.xml configurations, applicable for all web applications by default.

                      • 8. Re: Global web.xml configuration
                        jfclere

                        there isn't a global web.xml most the configuration is done via the element static-resources or jsp-configuration of the web subsystem.