I recently got started with Flex because I used to use eclipse. It is a little big for flex builder, although they are very similar, but how to combine a flex project with a Java Web project makes me depressed. It took nearly a day to complete a small example and mark it here.
Preparations: Eclipse, flex builder 3, blazeds package, tomcat5.5 or later
First, create a Java Web project.
Step 2: import the package and configuration file of blazeds into the Java Web project. The specific method is as follows:
Create a directory named "flex" under the webroot/WEB-INF/directory and copy the four configuration files under the flex folder in blazeds. Then copy all the jar packages under the lib directory in the blazeds to the Lib folder under the WEB-INF directory. Publish the web application on Tomcat first.
Next, create a new Flex project in flex builder. During the creation process, select "application server type" and select "J2EE ", select "Use Remote Object Access Service" for the following options, and click "Next". Select the server location on the following interface. Note that you must select the path of the corresponding project on Tomcat, for example, "$ tomcat_root $/webapps/helloworld", enter "localhost: 80xx" in the URL below, and write "conext root" to the project name. Click "Validate configuration". If there is no problem, continue to the next step until finish.
Then, the generated file contains several config files :. project ,. flexproperties ,. actionscriptproperties: Check the path of each file to ensure that the corresponding Tomcat path is correct. the <Name> bin-Debug </Name> attribute in the <cmdresources> element of the project must be consistent with the path of the application under tomcat.
Next is a very soil step, very soil ⊙ B sweat, the flex builder in the entire project copy out, in the Eclipse project under the WEB-INF to create a folder "flex-Src ", copy the flex project, delete the project in the flex builder, and use import --> "existing project from workspace" to create a new Flex project, in this way, the flex project and the Java project in eclipse are combined. The advantage is that eclipse can be used for release and debugging in Tomcat, and modifications in flexbuilder can also be seen in eclipse, of course, the method is very good. I think it may be a little cool to use the ant script, but it's not so good... ⊙
After nothing, the specific configuration, in addition to pay attention to the four configuration files (under the flex folder), I want to do nothing, especially pay attention to the destination node in the remoting-config.xml.