View comments | RSS feed

Editing the flex-config.xml file

Flex includes several configuration files to administer the behavior of your applications. Settings specific to the Flex application are defined in the flex_app_root/WEB-INF/flex/flex-config.xml file. Application server settings are located in the flex_app_root/WEB-INF/web.xml file.

The XML configuration files are easy to read and edit. In the case of the flex-config.xml file, you can use the flex-config.xsd schema file to validate your flex-config.xml settings. For web.xml file settings, consult your application server documentation.

You can change the location of the flex-config.xml file by editing the web.xml file and changing the value of the flex.configuration.file parameter. The following example shows the default settings:

<context-param>
   <param-name>flex.configuration.file</param-name>
   <param-value>/WEB-INF/flex/flex-config.xml</param-value>
   <description>configuration file</description>
</context-param>

You must restart the server after making changes to the flex-config.xml and web.xml files.

If you specify a URL beginning with a slash (/), it is relative to the web root. You can also use the {context.root} token in the URL to point to the context root of the application. This is defined by your application server. For more information on using the {context.root} token, see Editing the context root.

Some tags in flex-config.xml use a <path-element> child tag to define values. These tags support relative paths and full URLs. The following example adds a URL to the SWC file in the <lib-path>:

<lib-path>
   <path-element>http://mydomain.com/foobar.swc</path-element>
</lib-path>

The following tags can take file system paths or URLs as values:


Version 1.5

Comments


alongley said on Jan 7, 2005 at 8:02 AM :
It appears in Flex 1.5 that you CANNOT alter the web.xml content-param "flex.configuration.file" to point to another location. It appears that it is indeed hard-coded to look at /WEB-INF/flex/flex-config.xml. I was unable to get Flex to locate the flex-config.xml file in any other directory, such as /WEB-INF/flex-config.xml.
danger42 said on Jan 7, 2005 at 10:27 AM :
You're right. This functionality was available in Flex 1.0 but was removed from Flex 1.5. More specifically, the flex.configuration.file context parameter is not used by Flex 1.5. I will fix this in future revisions of the documentation. Thanks for pointing this out!

Matthew Horn
Flex Documentation

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/flex_docs_en/00001189.htm