What needs to be in a .war file to deploy a Flex application

antapache-flexflexbuilder

I've been using Flex Builder 3 to create Flex applications that are part of larger Flex / Java project using LiveCycle Data Services. Flex Builder creates and deploys the .war file, which is convenient for the development cycle, but I don't understand what the .war file has to contain in order to deploy and run.

I've found through trial and error that changing certain properties of the Flex Project (i.e. the Context Root) can break or fix the application, and somehow those settings make it into the .war file.

I need to get the entire build process implemented under Ant, and more importantly, I need to understand what the Flex part of the project depends on. I haven't been able to find any documentation that describes what a .war file has to include to deploy a Flex / Java application, however.

For example, Flex Builder creates a web.xml file and populates it with the correct tags. but if I add other features do I need additional tags in web.xml?

Does anyone know where I can find documentation on the .war file contents for a Flex / Java project?

Best Answer

Check out the sample applications here:

http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=build_apps_3.html

Those apps will give you some idea of what needs to go in the WAR. In a nutshell there are four significant locations in a standard WAR and one additional significant location in WAR using LCDS or Blaze DS:

myapp.war/
  WEB-INF/    <-- not accessible via the browser over HTTP
    classes/  <-- compiled classes and configuration files (this is where your .class files and jdbc.properties would go)
    flex/     <-- LCDS XML config files (services-config.xml)
    lib/      <-- web application libraries (.jar files, for LCDS and other tools you might be using)
    web.xml   <-- web application configuration

The Flex application itself will likely sit in the root of myapp.war or in any subdirectory of your choosing except for WEB-INF.

However if you study the sample apps and get your Ant script building the same structure that you see there you shouldn't have too many problems.

Related Topic