The Flex server and the JSP application are deployed as standard web applications in a J2EE servlet container. By using standard deployment architecture, you can assume that the IT costs for managing and deploying Flex and JSP applications are similar.
When a browser requests a Flex application, Flex compiles the MXML application to a SWF file if necessary, caches the SWF file, and returns an HTML page that references the compiled SWF file in HTML object and embed tags. When the browser processes the object and embed tags, the server requests the SWF file, and the SWF file begins running within the Macromedia Flash Player. The browser also saves the SWF file in the browser cache. The server retrieves subsequent requests for the same MXML application from the browser cache, if the SWF file is still up to date.
After Flex delivers the application to the browser, Flash Player builds the GUI and executes client-side business logic, including navigation through the application and client-side validation of inputs. The Flex application also can communicate with the server using SOAP-, HTTP-, and AMF-based web services.
In contrast, the initial request for a JSP application returns an HTML page; then, each media resource (for example, an image file) included on the HTML page requires a separate request to the server. The client browser must render an HTML page and most user operations, and then perform a round-trip connection to the server to retrieve a newly generated HTML page.