部署我的 Flex 应用程序

发布于 2024-08-29 09:45:20 字数 480 浏览 5 评论 0原文

我正在使用 Amazon ec2 盒子进行一些试验测试,部署在 Restlet 支持的 Web 服务之上运行的 Flex 应用程序。我遇到这个问题 - 每次我将应用程序部署到云时,我都必须将服务器的 IP 地址硬编码到 ActionScript/MXML 文件中 (http://72.93.48.39:8080/xxx/abc/),由于某些原因,我每次都被迫选择不同的IP。我认为这确实不是部署应用程序的正确方法。

我想知道其他人在这种情况下会做什么?

考虑到这一点,我想我可以让它从 HTML 包装器的 HTMLVars 中获取值。但每次都必须再次编辑。

是否可以在构建时提供这些值:服务器的 IP 地址、服务器的端口号(如果在某些机器上不是 8080)?如果是这样,任何人都可以给我一个 barbones 示例 build.xml 作为示例吗?

I am doing some trial testing awith Amazon ec2 boxes, deploying flex apps running on top of restlet powered webservices. I have this problem - Everytime i deploy the app to the cloud, I'm having to hardcode the IP address of the server into the ActionScript/MXML files (http://72.93.48.39:8080/xxx/abc/) and for certain reasons, i am forced to choose a different IP everytime. and i think its really not the right way to deploy the application.

I would like to know what other people do in such scenarios?

On thinking about it, i thought i could make it pickup values from the HTMLVars of the HTML wrapper. but that again has to be edited everytime again and again.

will it be possible to be able to supply these values : server's ip address, server's port number(in case its not 8080 on some machine) at build time? if so can anyone give me a barbones sample build.xml just as an example?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月亮邮递员 2024-09-05 09:45:20

经过大量研究,我(认为)终于找到了一种方法来做到这一点。解决方案是基于 ant 的 build.xml 文件。

解决方案是使用 EnvGen ant Task 生成“config.xml”之类的文件。 EnvGen 任务适用于 FreeMarker 模型 - 因此它需要数据和模板来生成文件。数据将通过 CSV 文件提供。将使用 Freemarker Template .ftl 文件指定模板。根据模板,EnvGen 也会生成 XML 文件。 EnvGen 任务的链接在这里 - http://www. basilv.com/psd/software-files/EnvGen/index.html#InstallEnvGen

最后,我们对 Flex 应用程序进行编程,以从 config.xml 文件中获取服务器端点值。

希望这对正在寻找这个答案的人有所帮助

After much research I (think) have finally found a way to do this. the solution is ant's build.xml file based

the solution is to use EnvGen ant Task to generate a "config.xml" file of sorts. The EnvGen task works on the FreeMarker model - so it takes data and a template to generate files. Data is to be supplied via a CSV file. Template is to be specified using the Freemarker Template .ftl file. Depending on the template EnvGen generates XML files too. the link to EnvGen Task is here - http://www.basilv.com/psd/software-files/EnvGen/index.html#InstallEnvGen

And finally, we program the Flex app to pick up the server end point values from the config.xml file.

Hope this helps someone who is looking for this answer

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文