2 Replies Latest reply on Dec 29, 2006 8:17 AM by gdoumenc

    Sharing flex dir on tomcat for several apps

    gdoumenc Level 1
      Hi,

      I have web applications on tomcat using flex working well.

      I want to share the WEB-INF/flex dir betwwen several applications. Where should I put them to be read from configuration files (it seems that pathes in web.xml are relative to the actual project..)
        • 1. Re: Sharing flex dir on tomcat for several apps
          Level 1
          Unfortunately, I don't think you can do that. The WEB_INF directory is for each individual web application and the J2EE programmer in me screams "NO! don't do that!" as it goes against the basic principals of the application server. The web.xml is made specifically for the web application - it should not breach a larger scope than that.

          I assume that you have several web applications and don't want to keep the separate conrfiguration files for each application. Your best bet is to set up some ant scripts that would build each application from your repository of configuration files. That way, if one of your applications needs to behave differently then the rest, only small adjustments to the ant script and repository are needed as opposed to having to readjust all your applications (and possibly destroying them all the process).

          We currently have that set up here and although there is some work up front for the setup, the payback is enormous. Anytime I need to rebuild an app, it is a snap.

          If, such a thing is possible, your best bet is to try to query the Tomcat forums, as they would best know how to enable such a thing. But it sounds like a dangerous proposition to me.

          just my two cents.

          --Andy
          • 2. Re: Sharing flex dir on tomcat for several apps
            gdoumenc Level 1
            Thanks,

            I disagree by the fact that the common dir may be hidden by the WEB-INF dir.. So global definitions can be ovverriden by local re-definitions....

            Regards