6 Replies Latest reply on Sep 17, 2006 7:28 PM by funaroma

    WEB-INF and a dedicated server

      I am trying to work through one of the Adobe examples:


      which requires that I create a Flex project, choosing "ColdFusion Flash Remoting". The very next screen of the project wizard asks for a "Root folder" and a "Root URL". In the example, I am instructed to "Use local ColdFusion server", which greys out the root folder and root url fields.

      However, I am using CF702 Enterprise, on a dedicated server here in my office. It has multiple IPs, and each website on the server gets its own IP. If I turn OFF the checkbox to "Use local ColdFusion server", I can then enter the data, but the ROOT FOLDER field is the problem - the only place there is a WEB-INF folder on this server, with a FLEX folder inside, is actually on the server's C: drive, at this location:


      But each website has it's OWN root folder! We have a directory on the server called "sites", and each site has it's own folder. We map "sites" to drive S. Therefore, my gut tells me that the root folder should be:


      Which should contain WEB-INF\flex (but doesn't!), and that the root URL should be just like all our other projects, where we map an internal DNS to the dedicated IP for the project:


      How do I set up Flex Builder 2 to work in this environment? Should I COPY the WEB-INF folder from the ColdFusion directory into each of the projects where i need to use flex builder? Or is there something different I should do?

      Thanks for your help,


        • 1. Re: WEB-INF and a dedicated server
          The wizard is to help you setup some default values. So if you just breeze through it and then go to Project -> Properties there are two areas you want to look at.

          First one is the the compiler arguments, Project -> Properties -> Flex Compiler. You should see a "-services" parameter, this is the setting that you want to point to the WEB-INF/flex folder, but you can actually copy the WEB-INF/flex/services-config.xml to any where you want and point the "-services" argument to the new location.

          The second area you want to look at is your build path, Project -> Properties -> Flex Build Path. Down at the botton you have to values the "Output folder:" and the "Output folder URL:". The first is for where you want the "bin" directory (the compiled files) to go. The second is what you want the URL to be when you run the application through the run button.

          Pretty simple, the wizard as far as I know is basically making this setup easier for normal installs.
          • 2. Re: WEB-INF and a dedicated server
            funaroma Level 1
            Yep, I checked all of that. I still get the following error when I run my project and click the "get String via Remote Object" button:

            faultCode:Server.Processing faultString:'File not found: c:\CFusionMX7\wwwroot\HelloWorld.cfc' fault Detail:'null'

            The cfc should NOT have to be in that directory -- it's in my dedicated server's webroot for this project, as outlined above. I've opened every single file in the project to try and find the reference to that directory, to no avail.

            What now?

            • 3. Re: WEB-INF and a dedicated server
              Renaun_Erickson Level 1
              In the services-config.xml look at the "endpoint" property.

              <endpoint uri=" http://{server.name}:{server.port}{context.root}/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
              Try changing the "{server.name}:{server.port}{context.root}" to your application instance values.
              • 4. Re: WEB-INF and a dedicated server
                funaroma Level 1
                I changed the line in services-config.xml, to read as follows:

                <endpoint uri=" http://testarea.advantex-internal.net/HelloWorld_ro/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>

                Which I still didn't expect to work because there is no flex2gateway directory in this virtual host's webroot... but the error didn't even change - it's still the same as before.

                How frustrating to think there are no common, decent help pages regarding a development and deployment environment where there may be multiple, disparate virtual hosts... what a crazy thing to be wasting time on, when I just want to get to work on these sample apps. Yes, I could bite the bullet and install CF locally, but that totally defeats the purpose of having our development server, which is essentially the same environment as our live servers... and is the preferred way to do development here. And maybe I don't want to load up my laptop with yet another pile of services.

                What gives, adobe? You are so close to "doing the right thing" with this release, yet I can't even build a sample app, simply because I have a different yet still very common development and deployment environment!

                Sorry for the rant... I'm tired, and I want desperately to understand... and I'm tired of spinning my wheels.

                What do I do next?
                • 5. Re: WEB-INF and a dedicated server
                  Renaun_Erickson Level 1
                  All my development and production servers use ColdFusion and Apache with multiple virtual hosts. I am using Standard so I assume with your Enterprise install you are using ColdFusion as a JRun server with J2EE war instances and virtual hosts through the JRun server not Apache or IIS, is this true?

                  I have used Tomcat and/or JRun as standalone servers with many applications, but I have not used ColdFusion Enterprise or its instances. So if you can help me understand what the instance is in terms of server side I might be able to understand it better.

                  I have done ColdFusion standard as a WAR install in Tomcat and ran that successfully, do you need to do this with each instance? Maybe the problem has something to do with how ColdFusion Enterprise treats it instances. Does it treat them as full blown different JRun instances or application instances, make sense?

                  And this all comes back to your original question about copying WEB-INF into the virtual-host webroots you are talking about. When I run my virtual hosts through Apache it just pickes up the WEB-INF stuff through Apache back to the default install, although the actually CFC's are in the virtual-host's webroot.

                  Hopefully that all made sense.
                  • 6. Re: WEB-INF and a dedicated server
                    funaroma Level 1
                    The answer to all of the above is simply "treat my CF Server install as if it were standard... 'cause that's how we did it."

                    I happily admit - I don't understand how all these pieces fit together... i don't understand the "flow". What the heck is this services-config xml file, and why is it causing me grief? As a person that runs over 100 sites, is this going to make my once-efficient development process a nightmare now? Is there any other way to debug this?