3 Replies Latest reply on Jun 8, 2009 12:48 AM by Richard_Abbott

    Invoking flex application in existing struts application

    sweetysk Level 1

                 Can I invoke flex application in existing struts application?
      which means I have struts application, In JSP I will provide one hyperlink as flex application. When I click on that hyper link I want to open flex application.
      Is it possible?
      I am able to find flex is front end and I am invoking struts but I want to invoke flex from struts.
      Can anyone please help me?


      Thanks in Advance

        • 1. Re: Invoking flex application in existing struts application
          Michael Borbor Level 4

          A Flex app when it's compiled becomes a SWF file, if you can embed a SWF in

          a JSP page, which is something easy to do, you can place a Flex app anywhere

          in your web application server.

          • 2. Re: Invoking flex application in existing struts application
            sweetysk Level 1

            Thanks for the reply


            My struts application doesnt have any flex capabilities and where should I place the swf file to load?

            how can i load swf file without flex capabilities in jsp?

            Or each time I have to place the swf file whenever I compile?

            As I am doing flex application in flex builder and struts application in myeclipse.

            Can u please tell me configuration settings to integrate flex in struts.


            Thanks in advance

            • 3. Re: Invoking flex application in existing struts application
              Richard_Abbott Level 3


              it is just as Michael has said. The swf file and associated tags can be put into whatever you are using application for client-side display. Since Flex is a client-side utility and struts only handles server-side interconnections there is no real overlap - the main points of contact are a) where you locate the delivery instructions for the swf, and b) any calls into the server-side files you make via URLRequest etc.

              For (a), take the auto-generated stuff that Flex does to deploy the swf as part of an HTML file and copy that into whatever HTML/JSP/etc files you have chosen to use for user interaction. The server does not need any Flex capability, only the client machine that the user will see.

              For (b), your Flex app needs to know the URL of whatever server-side capability you might need (eg database access) either as a hard-coded string or else as something you configure at runtime.

              Basically, the two halves are very loosely coupled so that the places and ways they join together are easily isolated.