title: Upload file from jsp
body: <p>I am trying to upload multiple files from jsp using below code:</p>
  
  <p>When I execute it from my local machine I am able to upload in the local systems folder.
  But when I access the same from remote machine I am expecting that the files should be uploaded to the same machine where my tomcat exist ,but I get error C:\Files\`folder/file not found`.
  Please guide.How to upload it in remote machine or where the tomcat resides</p>
  
  <pre><code>boolean isMultipart = ServletFileUpload.isMultipartContent(request);
       if (!isMultipart) {
       } else {
                 FileItemFactory factory = new DiskFileItemFactory();
                 ServletFileUpload upload = new ServletFileUpload(factory);
                 List items = null;
                 try {
                         items = upload.parseRequest(request);
                 } catch (FileUploadException e) {
                         e.printStackTrace();
                 }
                 Iterator itr = items.iterator();
                 while (itr.hasNext()) {
                 FileItem item = (FileItem) itr.next();
                 if (item.isFormField()) {
                 } else {
                         try {
                                 String itemName = item.getName();
                                 File savedFile = new File("C:\\Files\\a.tiff");
                                 item.write(savedFile);  
  
                         } catch (Exception e) {
                                 e.printStackTrace();
                         }
                 }
                 }
         }
  </code></pre>
  
  <p>This is the path where I want to upload all files <code>C:\\Files\\</code> of the machine where tomcat is.</p>