Java Reference
In-Depth Information
server-side methods are automatically deserialized into either dynamic or typed
ActionScript objects.
If you don't already have the Flex Builder installed, you can download a
60-day trial of either the Adobe Flex Builder 3 or the Flex Builder 3 plug-in from The plug-in
may get you up and running a little quicker and it's a pretty straightforward install if
you are comfortable with the Eclipse installation process.
Now create a new Web Application Project and uncheck “Use Google Web
Toolkit”. Since you are going to be using Flex as the front end for your application,
you'll want to add the Flex Project Nature to your project. Right-click the project
name in the left panel and select Flex Project Nature ¾ Add Flex Project Nature.
Choose “Other” as the application server, click Next, and then click Finish. This
will automatically create your Flex main.mxml file in the src directory. Once the
main.mxml file has been created, the Eclipse Problems tab should display the
following error message, “Cannot create HTML wrapper. Right-click here to recreate
folder html-template.” To fix this error, simply right-click the error message and
select “Recreate HTML Templates.”
Now you need to install the required jar files for GraniteDS. Download the latest
version of GraniteDS from, unzip the
files, find granite.jar in the graniteds/build/ directory, and place the jar file into your
project's /WEB-INF/lib/ directory. You'll also need to get the latest version of Xalan-J
from Unzip the files and copy
serializer.jar and xalan.jar into your project's /WEB-INF/lib/ directory.
Server Configuration
Now that you have the Flex Builder (or plug-in) set up correctly and your project
created with all of its requirements, you can start configuring your application.
First, you need to tell App Engine which classes GraniteDS uses as well as define its
servlet mappings. Place the code shown in Listing 4-15 in the web-xml file between
the <web-app> tags.
Listing 4-15. The web.xml file
<!-- GraniteDS -->
<!-- handle AMF requests serialization and deserialization -->
Search WWH ::

Custom Search