Dave, I am going to test the servlet method (all made perfect sense) - just wanted to say thanks for the time to write your suggestions - its appreciated :) Regards Leon
-----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf Sent: 24 January 2006 13:52 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Cairngorm Question Hi Leon, A couple things here. 1) In ANT you can, at build time, replace tokenized values in any file. We do this quite a lot. So for instance you could modify your flex-config to do <amf-gateway>/@webappname@/amfgateway</amf-gateway> Now when you do your build and copy the file in, you can do replacements of the @token@ token. Something like: <copy todir="${build.dir}"> <fileset dir="${src.dir}"/> <filterset> <filter token="webappname" value="${web.app.name}"/> </filterset> </copy> You can then prompt for the web app name during the build. 2) If you cant do this during the build you can do it at runtime in a few ways. First would be a servlet, listed to load at startup and placed in order 1. The servlet would find out its current context, then modify the flex-config.xml file itself replacing the web app name with whatever the name is of its own file. This would be purely J2EE agnostic. If though you're using Tomcat you can also do this with a Tomcat listener. Effectively the listener fires at server boot and you could again replace values. But the prior solution would work on any app server and without messing with your clients servers. I hope that helps. -- Dave Wolf Cynergy Systems, Inc. Macromedia Flex Alliance Partner http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In flexcoders@yahoogroups.com, "Leon Tanner" <[EMAIL PROTECTED]> wrote: > > Ok, we've gone down the route of using mxmlc.jar for precompilation. > The reason is purely to include data within the SWF to save a return > trip to the server - and also to reduce the load on the server at > initial request time. > > Our process is essentially running a series of Ant tasks that firstly > compile all our Java classes, secondly precompile our MXML and lastly > create a WAR ready for deployment. > > Since the MXML is precompiled without using the Flex server whatsoever, > we need to specify the gateway to the compiler - this is currently done > in flex-config.xml. At present we can't find a way to make this > relative - i.e. not to include the name of the root directory. For > example: > > <amf-gateway>/myFlexApp/amfgateway</amf-gateway> > > Ideally what we'd like is: > > <amf-gateway>./amfgateway</amf-gateway> > > The reason why we'd like this is - when we create a WAR and deploy to > our customers, we don't have control over what they choose to name the > WAR file. Since the name of the WAR file relates to the root directory > name and we can't find a way to make that value relative, we have a hugs > issue here! > > Has anyone come across this or have any ideas we could try to get around > it? > > Thanks > L > > > > > > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Darron J. Schall > Sent: 24 January 2006 00:45 > To: flexcoders@yahoogroups.com > Subject: Re: [flexcoders] Re: Cairngorm Question > > Dave Wolf wrote: > > I was just shown your weblog today about this and they are awesome. > > The crazy part is they look a ton like ours. Guess you have a couple > > of smart people and they reach the same conclusions! Really great > > posting Darron. We have tons of macros for everything from compiling > > the swf, the rsl's, java jars, deploying web services etc. > > > > > Not so crazy - I was talking with Ted on IM when he was working on them > for you. ;-) Either way, Flex + ANT is a good combination. Sure, > there's a learning curve.. but it's a powerful technology and one worth > learning, in my opinion. > > -d > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/