Utilize Flex And Java Servlet To Implement File Upload

Preview:

Citation preview

Utilize Flex and Java Servlet to Implement File

UploadAlbert Guo

junyuo@gmail.com

Use Case Architecture Storyboard Flex files Implementation FileUpload Servlet Implemetation

Agenda

Use Case

Architecture

Architecture

Bridge between Java and Flex

The RemoteObject protocol is the fastest communication method for data services that Flex offers.

The class gives you access to back-end classes through AMF encoding. This binary protocol uses Java classes directly to provide data to Flex.

The RemoteObject component uses HTTP to transport binary ActionScript over the communication channel.

RemoteObject Protocol

RemoteObject Protocol

RemoteObject Protocol

Mxml filesServlet

commons fileUpload

Sequence Diagram

Storyboard

StoryboardClick “File” and select “Open”

Storyboard – cont.System will launch this popup window

Click “Upload File” button

Storyboard – cont.

Choose one xml file

Storyboard – cont.

System will show this confirmation message, it will start to upload after you click “Yes” option.

Storyboard – cont.

System will show upload progress in this area.

Close window as user click this button

Flex files Implementation

Flex files Implementation

Flex files Implementation – cont.

Flex files Implementation – cont.

Flex files Implementation – cont.

Flex files Implementation – cont.

Flex files Implementation – cont.

Flex files Implementation – cont.

FileUpload Servlet Implemetation

FileUpload Servlet Implemetation

FileUpload Servlet Implemetation – cont.

FileUpload Servlet Implemetation – cont.

Web.xml

Register <servlet> and <servlet-mapping> to web.xml

Recommended