1 Reply Latest reply on Oct 26, 2009 5:48 AM by _Natasha_

    Send a parameter from flex to jsp page (HTTPService)

    bilbrux Level 1

      Hi everybody,


      I want to call a hidden form in a jsp page, and send it values from my flex application to finaly send form to another site when jsp page is loading.


      For that, i use an HTTPService;

      <mx:HTTPService id="myHTTPService" useProxy="false" method="POST" url="http://www.mysite/mypage.jsp"/>

      to send a model object:

      <mx:Model id="myCar">


      In jsp side, i have:




      <body onload="myForm.submit();">


           <form action="http/newurl....(i send form to an other site)" method="POST" id="myForm" name="myForm">
            <input type="hidden" name="CarId" value="<%request.getParameter("CarId"); %>">
            <input type="hidden" name="CarName" value="<%request.getParameter("CarName"); %>">


      To send the model object, i use in Flex side : myHTTPService.send(myCar); but i'am not been redirected to http://www.mysite/mypage.jsp where the form should be sent to http/newurl....


      I tried


      var urlRequest:URLRequest=new URLRequest('http://www.mysite/mypage.jsp');

      But the jsp page could'nt get values from the flex application.


      Someone know about how to do it? any answer will be very appreciated!