Flex 与 ColdFusion 和 JRun 有什么关系?- -| 回首页 | 2005年索引 | - - FlexBuilder 2.0 速学教程(1)

如何把 Flex 和 IIS集成在一起使用?

关键词如何把    Flex    IIS集成在一起使用?                                          

The "Integrated JRun" install does not support IIS connectors. If you are using full JRun or Coldfusion, see the link below, and for other application servers see their documentation.
http://www.macromedia.com/go/96611248

How to configure IIS to access MXML pages under the web server root when Flex is deployed on JRun or ColdFusion

Issue

There are times when it may be desired to put the MXML pages outside of the Flex web application structure. This TechNote describe how to configure IIS to accomplish that. This TechNote requires that the web server already be configured to communicate with JRun or ColdFusion and MXML pages can be served up correctly via IIS.

Solution

MXML pages are usually put under the Flex web application that has been deployed on your application server. For example, in this TechNote, we deploy the Flex samples.war under JRun (C:\JRun4\servers\flex\samples), where flex is a JRun server name and samples is the Flex application name. The context root for this Flex application is /samples.

If we put an MXML page named myfontSize.mxml under the samples directory, then we can access it as follows:
http://localhost:8700/samples/myfontSize.mxml (using the JRun internal web server) or
http://localhost/samples/myfontSize.mxml (using a web server such as IIS or Apache)

If you are using IIS with the web application and want to put MXML pages under the web server root, such as \inetpub\wwwroot or another location that's outside of the web application root, two types of problems may be encountered:

Note: ignoresuffixmap must be set to false in your jrun.ini file. jrun.ini file is usually located under the JRun installation lib directory. For example:, C:\JRun4\lib\wsconfig\1\jrun.ini.

Sample jrun.ini:

verbose=true
scriptpath=/JRunScripts/jrun.dll
serverstore=C:/JRun4/lib/wsconfig/1/jrunserver.store
bootstrap=127.0.0.1:51002
apialloc=false
ssl=false
ignoresuffixmap=false
#errorurl=<optionally redirect to this URL on errors>

IIS serving up the MXML source

Reason: MXML and SWF extensions are not mapped in IIS.

Solution: Follow the steps in TechNote tn_19344 to map MXML and SWF extensions in IIS.

Page cannot be displayed

Reason: Home directory in IIS is not configured correctly, or the URL to serve up the MXML page is incorrect.

Solution: To move myfontSize.mxml from C:\JRun4\servers\flex\samples to C:\Inetpub\test, do the following:

  1. In the IIS management console, go to the properties of the website you want to configure, and then click on the Home Directory tag.
  2. Change the Local Path to point to C:\Inetpub\test.
  3. Restart IIS to be sure the change took effect.

myfontSize.mxml should now be accessible at http://localhost/samples/myfontSize.mxml.

Note:

  • You still need to use the context root /samples in the URL even though the MXML file is not under the web application root.
  • If you put myfontSize.mxml under C:\Inetpub\test\myflex, then the URL would be:
    http://localhost/samples/myflex/myfontSize.mxml

【作者: 10258989】【访问统计:】【2005年11月19日 星期六 23:27】【 加入博采】【打印

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=3581829

博客手拉手

[2005-11-19 22:23:13.0]    Flex 2 Announcement

[2005-11-19 22:21:29.0]    Flex getURL and Javascript

[2005-11-19 22:45:02.0]    Flex 白皮书

[2005-11-19 22:35:02.0]    Flex Builder1.5更新说明

[2005-11-19 22:51:52.0]    Web 2.0 and Flex(英语)

回复

评论内容: