2 Replies Latest reply on May 16, 2007 12:02 PM by javagrannie

    How to integrate Flex application with Struts

    Ashish Mishra
      Hi Frenz,

      I m new to Flex, Can somebody tell me How can integrate my flex application with the Struts application. What things need to be added in the my Application.war file.

      Thks in advance, Plz tell me



        • 1. Re: How to integrate Flex application with Struts
          cluebcke
          IMHO, that's a more complex question than you're making it out to be. Struts does several things, but two of them are:

          1. Separate concerns into model, view and controller on the server
          2. Generate JSP pages for the view

          The first of these is probably not applicable for a normal Flex application, since Flex clients are typically stateful and almost everybody implements some form of MVC structure within the client itself. Flex clients also typically interact with the server in some sort of SOA-like manner, which means that servers can be and usually are (mostly) stateless. So Struts' MVC implementation, which is really the most notable thing about the framework, is probably useless to a Flex app.

          In the second case, it's obvious that you don't want to use Struts to generate JSPs which themselves create HTML and JavaScript views. You can handle requests from a Flex client through JSPs, but typically those JSPs would just be producing XML to send back to the client.

          I suggest that you read up on some of the documentation or books to learn about how Flex applications are typically structured before you dive in. Struts supports thin clients, Flex is a rich (thick) client--they're fundamentally different architectures.
          • 2. Re: How to integrate Flex application with Struts
            javagrannie
            According to this site it is possible.
            http://www.adobe.com/devnet/flex/articles/struts.html
            However I cannot get it to see my taglib no matter how closely I follow the directions. I am getting:
            Unable to initialize TldLocationsCache: null
            from this line in the jsp
            <%@ taglib uri="/WEB-INF/lib/flex-bootstrap-jsp.jar" prefix="mm" %>
            Any help would be seriously appreciated.