-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Flex 3 with Java

As you know, a HTTPService
class can be used to make HTTP calls to your server-side business logic to send and load plain-text results into your Flex application.
Typically, JavaServer Pages (JSP) is used for processing and building dynamic results, and returning presentation HTML code/an HTML page which is rendered by your web browser. But in this chapter, you will learn how to use JSP to build dynamic results and let it return an XML document or JSON object instead of the HTML code. Let's understand how the HTTPService
class can be used to load XML and JSON data.
The following example illustrates how to use a HTTPService
class to communicate with JavaServer Pages (JSP) to send and load dynamic XML data.
XMLHTTPServiceExample.mxml:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.rpc.events...
Change the font size
Change margin width
Change background colour