using webtier compiler with flex 3

In flex 2, the webtier compiler is included in the SDK. But in flex 3, it is no longer included in the flex 3sdk install. You have to install and configure it separately. The following links will show you how to install and configure it.

http://labs.adobe.com/wiki/index.php/Flex_Module_for_Apache_and_IIS

http://livedocs.adobe.com/flex/3/html/help.html?content=apache_3.html

http://opensource.adobe.com/wiki/display/flexsdk/Downloads

There are two type of configuration:

1. config with Apache or IIS connector. If you are using Apache or IIS as your web server, then this may be the approach you want to take.

2. install as a J2EE app. This approach will install a webtier.war to your machine. Then you can deploy this war file to the app server you are using. You should deploy it as extracted app, and put your flex app page under the web root.

Problem:

When you run a flex app page with the webtier compiler, it runs fine the first time you request it. If you modify anything in the code and recompile that page, then you may see the following Error:

TypeError: Error #1010: A term is undefined and has no properties.
at mx.styles::StyleManagerImpl/initProtoChainRoots()
at mx.styles::StyleManager$/http://www.adobe.com/2006/flex/mx/internal::initProtoChainRoots()

See bug http://bugs.adobe.com/jira/browse/LCDS-387 for details.

Workaround:
By default, we are using incremental compile to do the compiling, but the incremental compile has some issues. The workaround is to not use the incremental compile.

in flex-webtier-config.xml; set the incremental-compile to false:
<incremental-compile>false</incremental-compile>

Once the change is made, the webtier compiler will work properly.