0 Replies Latest reply on Jun 27, 2008 6:06 AM by Solerous

    reading objects sent via URLRequest

    Solerous Level 1
      I'm trying to send and object to a servlet (a ByteArray which I can then encode into and image file in java) and following the documentation, I think this is the proper method to send it (component is a UIComponent such as a Panel)

      var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(component);
      var imageByteArray:ByteArray = imageSnap.data as ByteArray;

      var request:URLRequest = new URLRequest(url);
      request.data = imageByteArray;
      request.method = URLRequestMethod.POST;
      navigateToURL(request);

      But I have no idea what to do with the request.data in the servlet. How do I access is as a byte array in the servlet?