4 Replies Latest reply on Oct 1, 2009 7:55 AM by Dora06

    How to debug while using Flex JSP

    yplenet
      Hi,

      I am currently using Flex JSP taglib, it works pretty well, however I am unable to start the flex in debug mode when it is embedded in a JSP : I can't use "debug as" as it is embedded in the JSP.
      is there anyway to cope with this problem and to debugg directly inside the JSP ?
        • 1. Re: How to debug while using Flex JSP
          JKohn99
          try:
          1) You must embed the -debug version of your swf file in the jsp.
          2) On the debug panel in Flex builder (uncheck use defaults and put the url
          of your jsp in place of the default url or path to launch.

          I've debugged jsf application with flex components embedded in this manner.

          I'm pretty sure that this will only work if the flex swf is in the first page. If you navigate to a 2nd page with a new swf he won't be able to connect to the debugger.
          • 2. Re: How to debug while using Flex JSP
            Dora06

            Hi ,

            I am a newbee to using flex with jsp. I have tried to use the flextaglib for embedding flex code into the jsp page. When I try to load my webapplication I get the following error . I have attached a copy of the jsp I am trying to display. I havemade the necessary changes to the web.xml and also included all the jars.  Thanks for your help in advance

             

             

             

             

             

            Invalid at the top level of the document. Error processing resource 'http://localhost:8080/TestFlexHttpService/PlainHttpSer...

             

             

            • 3. Re: How to debug while using Flex JSP
              Dora06 Level 1

              Hi,

              I am a newbee to using flex with jsp. I am trying to access the flex mxml components in my jsp but I get the following error

              "Cannot view XML input using style sheet"

               

              Attached is my jsp page.

               

              Thanks for your help in advance.

              • 4. Re: How to debug while using Flex JSP
                Dora06 Level 1

                Hi,

                I am a newbee to using flex with jsp. I am trying to access the flex mxml components in my jsp but I get the following error

                "Cannot view XML input using style sheet"

                 

                I am unable to attach my jsp here is the code

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                <%@

                 

                 

                page import=

                "quickstart.ShippingCalculator,

                quickstart.ShippingOption,

                java.util.List"

                 

                 

                %>

                <%@

                 

                 

                taglib uri="FlexTagLib" prefix="mm"

                %>

                <%

                ShippingCalculator calc =

                 

                new

                ShippingCalculator();

                List options;

                 

                 

                int

                zipcode;

                 

                 

                double

                pounds;

                 

                zipcode = Integer.parseInt(

                 

                "30005"

                );

                pounds = Double.parseDouble(

                 

                "30"

                );

                 

                options = calc.getShippingOptions(zipcode, pounds);

                 

                 

                 

                for (int

                i = 0; i < options.size(); i++) {

                ShippingOption option = (ShippingOption) options.get(i);

                %><%=

                 

                 

                option.getService() %>: <%= option.getPrice() %>

                USD

                <%

                }

                 

                %>

                 

                <?

                 

                 

                xml version="1.0" encoding="utf-8"

                ?>

                <

                 

                 

                mx:Application xmlns:mx=

                "http://www.adobe.com/2006/mxml"

                 

                 

                 

                layout=

                "absolute"

                 

                 

                 

                backgroundColor=

                "#FFFFFF"

                 

                 

                 

                backgroundAlpha=

                "0"

                 

                 

                 

                backgroundImage=""

                >

                 

                 

                <mx:Label x="56" y="32" text="Zip Code" width="55" height="18" textAlign="right" fontWeight="bold"

                />

                 

                 

                <mx:Label x="56" y="58" text="Weight" width="55" height="18" textAlign="right" fontWeight="bold"

                />

                 

                 

                <mx:TextInput x="130" y="32" id="zipcode" width="160" height="22"

                />

                 

                 

                <mx:TextInput x="130" y="58" id="weight_lb" width="160" height="22"

                />

                 

                 

                <mx:Button x="130" y="95" label="Get Shipping Options" click="plainRPC.send();" width="160" height="22"

                />

                 

                 

                 

                <mx:Text x="56" y="150" id="shippingOptions" width="310" height="133" fontWeight="bold"

                />

                 

                </

                 

                 

                mx:Application

                >