O'Reilly logo

Actionscript Cookbook by Joey Lott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20.4. Configuring Flash Remoting for J2EE

Problem

You want to configure Flash Remoting for J2EE.

Solution

Copy the flashgateway.jar file into the web application’s WEB-INF/lib directory and configure a servlet and servlet-mapping in the web.xml file. If you use JRun 4 as your J2EE server, Flash Remoting comes preinstalled.

Discussion

If you are using JRun 4 as your J2EE server, Flash Remoting comes preinstalled and you do not need to purchase or configure any additional software. If you use a third-party J2EE server, such as IBM WebSphere or BEA Weblogic, the Flash Remoting for J2EE gateway, sold separately by Macromedia, allows Flash clients to communicate with Enterprise Java applications (see http://www.macromedia.com/software/flashremoting/productinfo/versions_pricing). If you are not using JRun 4, you must download and install either the trial version or full version before proceeding. (As an open source alternative, see the OpenAMF project at http://www.openamf.org.)

All the necessary code for Flash Remoting for J2EE is contained within the flashgateway.jar file. You can find this file in the Flash Remoting installation (on Windows machines this is typically under C:\Program Files\Macromedia\Flash Remoting MX). You can either extract the .jar file from the .war file (flashgateway-samples.war) or copy it from the sample application (within the sample\WEB-INF\lib subdirectory). You should copy this .jar file to the WEB-INF/lib directory of your own J2EE web application.

Once you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required