This content has been marked as final. Show 16 replies
I would recommend creating an ant script that cleans, compiles, and deploys. If you are already building J2EE applications, then all you really need to do is and your flex stuff to your ant deployment script.
Thanks for the reply. I am a mere novice in the field of these technologies for web applications, so I am not aware of Ant or of other such things. Can you please detail me in layman terms, how to deploy an example flex application on a j2ee application server.
Which J2EE application server are you using? Their deployment procedures differ.
JDeveloper is a client-side integrated development environment (IDE), not a J2EE server. From a quick glance at Oracle's JDeveloper documentation, it seems to work with a number of app servers, including Oracle's OC4J and Apache Tomcat.
So back to my previous question: which J2EE app server are you using?
Ok, I am sorry for the last post. Its Oracle's OC4J am trying to deploy my flex application on. OC4J is the default app server that comes along with the JDeveloper IDE.
The Flex Data Services J2EE install gives you three WAR files, which you should be able to deploy into OC4J.
* See the OC4J docs for deployment instructions
* See the Flex installation instructions for more information, including a special step for OC4J.
Thanks for the links, but I still dont understand the role of flex data services in the process of deployment of a simple flex application on an app server. Why do I need to install the flex data services application.?
Among other things, Flex Data Services offers enhanced security, proxy functionality, messaging, and the Data Management Service (for real-time data synchronization among multiple clients). That said, one of the major features of Flex 2 is the ability to deploy your Flex application _without_ a server.
Have you read the Getting Started with Flex 2 book? It's online in HTML format in LiveDocs and in PDF from the Flex Documentation page. In particular, I think the tutorial lessons are very helpful, although you may have to adapt them a little if you're using JDeveloper.
I see, that's interesting. But right now the only concern I have is to deploy the application on the server. I did read the 'Getting Started' and specifically the Deploying flex application part of it, but the directory structures given in there have no similarity to what is available on OC4J. :(
You should be able to install the flex.war, flex-admin.war, and samples.war web applications using the instructions Oracle provides. There is a lot of doc on their website, and this might be the page you're looking for. Also, there is an additional tweak to OC4J listed here.
My advice is to start by deploying samples.war and running the sample applications on OC4J. This will verify the installation/deployment. Once you've done that, set up a Flex Builder project for one of the samples and make sure that works. That should get you going.
I know am pushing it a bit too far, but can you please let me know where do I get these .war files from. As in, my installation of the flex builder doesn't contain the .war files for the sample applications which are there already. Also , if I wish to make a .war file for my application how do I do that.?
No problem. You get the WAR files by downloading Flex Data Services and choosing the J2EE option when you run the installer. You can get the installer by going to http://www.adobe.com/products/flex/, clicking on the Flex for Developers tab and downloading free Flex Data Services 2 Express.
As I said earlier in this thread, you can get installation instructions from http://www.adobe.com/support/documentation/en/flex/2/install.html#flexj2ee
That should do it!
Is .war file any different from an archive such as .zip of all the project files associated with the application. That is to say, can I zip all the contents and rename it to a .war extension and give to my OC4J server which will deploy it.
Here's what I think you do:
1) Deploy the flex.war file (this is the empty WAR file you use to start new FDS apps) onto your test/development server.
2) Modify configuration files, create and test assemblers, define resources, as necessary. Create MXML and AS files, compile them, define HTML wrappers, etc., and store them in or under the web application root (not under WEB-INF).
3) Zip up the app into a WAR file and deploy on other servers, as necessary.
Is that not too much to ask for.[:(]. I seriously wonder if the whole web application deployment technology needs a restructuring to get rid of these cumbersome issues. I am perplexed if the same application can run from inside the flex builder , WTH it cannot from within the web server.
>>Here's what I think you do:
>>1) Deploy the flex.war file (this is the empty WAR file you use to start new FDS apps) onto your test/development server.
>>2) Modify configuration files, create and test assemblers, define resources, as necessary. Create MXML and AS files, >>compile them, define HTML wrappers, etc., and store them in or under the web application root (not under WEB-INF).
>>3) Zip up the app into a WAR file and deploy on other servers, as necessary.