Hello, i' m using BlazeDs.
In services-config.xml we got following configuration of endPoint.
<channel-definition id="any-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
Before compiling flash application i set up context-root as compilaction option.
bin\mxmlc -context-root / -services "flex/services-config.xml" -optimize=true -o ..\..\bin\Messenger.swf Messenger.as
In my case this is "/"
And the problem is that messanger.swf is able to pull request if the web application is started as ROOT in tomcat webapps. I mean it can only be access by this url localhost:8080/. If i try to move webaplication to another folder - for example to localhost:8080/myApplication messenger.swf would not work properly sinse i have to change root_context as well.
So my question how to dinamicly determine context-root in run time, without hardcode it as option of compiler ? I want my .war application work properly regardless of it position in webapps folder(url).
Thank you