0 Replies Latest reply on Apr 23, 2007 4:59 AM by 946

    using URLVariables

      Hi,
      I'm using URLVariables to send data to servlet on server side.
      my code looks like:
      var loader:URLLoader = new URLLoader();
      var data1:ArrayCollection = new ArrayCollection;
      var targetServlet:URLRequest = new URLRequest("servletname");
      data1.addItemAt("Dummy1",0);
      data1.addItemAt("Dummy2",1);
      data1.addItemAt("Dummy3",2);

      var arrayData:URLVariables = new URLVariables();
      arrayData.exampledata = data1.toString();
      targetServlet.data =arrayData;
      targetServlet.method =URLRequestMethod.POST;
      loader.addEventListener(Event.COMPLETE, completeHandler);
      try{
      loader.load(targetServlet);
      }
      catch(er:Error)
      {status.text="Error";
      }

      now in my servlet code i should be able to get the arraycollection data using
      request.getParameter("exampledata") but it's returning me null.
      Any ideas on that?