Flex4 and Java communication (first, with ordinary Java class communication)

Source: Internet
Author: User
Tags tomcat tomcat server

Here's a way to implement Java and Flex communications using BlazeDS

BlazeDS is a server-based Java remote control (remoting) and Web messaging (messaging) technology that enables back-end Java applications to communicate with Adobe Flex applications running on browsers.

1. Development Preparation

1. Install JDK and Tomcat and implement a successful configuration.

2. Install the Flex SDK. See the official documentation for details

3. Download BlazeDS, if you are using the turnkey version (recommended to download this version) inside actually contains the TOMCAT server.

I'm using myeclipse8.5, Flash Builder 4.

2, first build Java engineering Flexdemo, and import blazeds

Click OK, and then select the BlazeDS check box that you imported in

Click Finish to complete.

3, configure the Tomcat server, deploy the application, and start the service.


4, open the Flash Builder4 client, create Flex project Flex4demo

Click Next to enter the Java server Configuration entry, configured as follows:

Click Next to enter the Flex project build path option

Click Finish.

5. Back to MyEclipse editor, create HelloService class, add SayHello () method.

6. Configure Remote service target (webroot/web-inf/flex/remoting-config.xml)

7, back to the Flash Builder4 editor Mxml write the following code:

8, running Flex applications, you can:

Ok! the first instance of Flex and Java communication is complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.