Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Flex in struts


Level 2

i want to implement flex application in struts.i want to know
the architecture to implement the flex application in the
normal struts application we will be using jsp pages .in the jsp
page we will be giving the form action as some as<html:form
action="">.while in mxml how we redirect the mxml page
to the struts config xml(need a tag for redirecting to the struts.

in struts config xml we forward path we should give the name
of the mxml file like<forward path="Sample.mxml">

is it correct and wat are the options available in it and i
need a detailed explained from this regards


0 Replies


Level 2
So it sounds like you are building an application which mixes
struts logic with flex logic - one page is rendered entirely in JSP
with struts, but when you click a button you want to go to an MXML
page and then at some point go back again?

The important thing to keep in mind here is that each MXML
page first compiles the MXML file into a SWF file, then simply
renders as an HTML page which has an Object tag which refers to the
compiled SWF file. So if you are mixing HTML and Flash, you simply
need to take that snippet of HTML and put it into your JSP page and
arrange to have your SWF compiled. You can compile MXML files with
the "mxmlc" compiler via an "ant" task for example.

Struts (and your browser) would only need to see requests for
JSP pages. One or more of these pages could contain regions which
are implemented in Flash. I think it is also possible for a button
in Flash to reload the page it is defined in if that would help....
I'm not sure how it is done but you could do it via the
ExternalInterface api in flash.

Does this answer your question?