title: dojox.form.Uploader - Submit - doesn't reach the REST service from IE8
body: <p>I'm trying to implement the dojox.form.Uploader in order to upload the files. I've created a simple REST service in JAVA.
  From Firefox and Chrome, the service gets the form and saves the data, but this is not the case for IE8.</p>
  
  <p>In IE8 I get totally different response object compared to what's fired in FF/Chr. It's actually an array with the file information, all with the 'error' - 'server time out' message. In fact, the form submission doesn't even hit the service.</p>
  
  <p>I've just started with JAVA REST services so pardon any obvious errors.</p>
  
  <p>Thanks heaps.
  M.</p>
  
  <p>client side code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Uploading test&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/resources/dojo.css" /&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/tundra/tundra.css" /&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/nihilo/nihilo.css" /&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/soria/soria.css" /&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/form/resources/FileUploader.css" /&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/form/resources/UploaderFileList.css" /&gt;
  &lt;link rel="stylesheet" type="text/css"
      href="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/form/resources/FileInput.css" /&gt;
  &lt;script type="text/javascript"&gt;djConfig = { parseOnLoad:true, isDebug:true, dojoBlankHtmlUrl: 'blank.html'  };&lt;/script&gt;
  &lt;script type="text/javascript"
      src="https://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"&gt;&lt;/script&gt;
  &lt;script&gt;
          dojo.require("dojox.form.Uploader");
          dojo.require("dojox.form.uploader.FileList");
          dojo.require("dijit.form.Button");
          dojo.require("dijit.form.TextBox");
          dojo.require("dijit.form.CheckBox");
          dojo.require("dojo.io.iframe");
          dojo.require("dojox.form.FileInput");
          dojo.require("dojox.form.uploader.plugins.Flash");
          dojo.require("dojox.form.uploader.plugins.HTML5");      
  
          function prepareForm(){
            var form = dojo.byId("myform");              
  
            // Disable the button at startup
            //dijit.byId('submitId').set("disabled", true);
  
            // Connect to the onChange event of file upload stuff.
            dojo.connect(dojo.byId("uploader"), "onchange", function(){ 
                //checkExtension();
            });
  
          // Connect to the onChange event of file upload stuff.
            dojo.connect(dijit.byId("uploader"), "onComplete", function(response){ 
                dojo.byId("response").innerHTML = "Form posted with status : " + response;
            });                        
          }
          dojo.ready(prepareForm);
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body class="soria"&gt;
      &lt;b&gt;Simple Form:&lt;/b&gt;
      &lt;br&gt;
      &lt;form method="post" action="jersey/fileupload2" id="myForm"
          enctype="multipart/form-data"&gt;
          &lt;legend&gt;file upload test&lt;/legend&gt;
          &lt;input name="uploadedfile" multiple="true" type="file" id="uploader"
              dojoType="dojox.form.Uploader" label="Select XLSX Files"
              style="width: 150px;"&gt;
          &lt;div id="files" dojoType="dojox.form.uploader.FileList"
              uploaderId="uploader" style="width: 300px;"&gt;&lt;/div&gt;
          &lt;br /&gt; &lt;input type="submit" label="Submit"
              dojoType="dijit.form.Button" id="submitId" /&gt;
      &lt;/form&gt;
      &lt;br&gt;
      &lt;b&gt;Result&lt;/b&gt;
      &lt;div id="response"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>server side code</p>
  
  <pre><code>@Path("fileupload2")public class FileUploadResource2 {
  @POST
  @Consumes("multipart/form-data")
  @Produces("text/html")
  public String loadFile(@Context HttpServletRequest request) {
      String resultStatus="{response:'fail'}";
      String fileRepository="C:\\TEMP\\";     
      if (ServletFileUpload.isMultipartContent(request)) { 
          FileItemFactory factory = new DiskFileItemFactory();
          ServletFileUpload upload = new ServletFileUpload(factory);
          List&lt;FileItem&gt; items = null;
          try {           
              items = upload.parseRequest(request);
          } catch (FileUploadException e) {               
              e.printStackTrace();
          }
          if(items!=null) {
           Iterator&lt;FileItem&gt; iter = items.iterator();  
           while (iter.hasNext()) {  
               FileItem item = iter.next();                
               if(!item.isFormField() &amp;&amp; item.getSize() &gt; 0) {  
                       String fileName = processFileName(item.getName());
                       resultStatus="{response:'ok.'}";
                       try {
                          //throw new Exception("error happened.");
                          item.write(new File(fileRepository+fileName));
                      } catch (Exception e) {
                          resultStatus="{response:'failed.'}";
                          //e.printStackTrace();
                          //return "{result:'" + e.fillInStackTrace()  + "'}";                        
                      }  
  
               }               
           }  
          }           
       }
      return resultStatus;
  }
  
  private String processFileName(String fileNameInput) {
      String fileNameOutput=null;
      fileNameOutput = fileNameInput.substring(fileNameInput.lastIndexOf("\\")+1,fileNameInput.length());
      return fileNameOutput;
  }
  </code></pre>
  
  <p>}</p>