1 Reply Latest reply on May 23, 2008 8:04 AM by David Roberts

    File path is looked in the server machine

    Varun Doda Newbie

      Hi,

      I have created a form in which it takes the path of the file, reads the file and then writes that file in another file. The problem is that when I access the application from other machine (the machine on which server is not running) then when i give the file path it looks for the path on the machine on which server is running. I don't want that. Instead it should look for the file on the machine on which the path is given.

      Can anyone help me in this?

      Regards,

        • 1. Re: File path is looked in the server machine
          David Roberts Apprentice

          This is not a Jbpm question, it is a normal Java web application question, so you should look for the answer elswhere.

          However, basically you cannot have the Java code sitting on your server, accessing a path on your client machine. This is obvious for security/design reasons etc.

          What you could do is have your web browser "upload" the file, using a form. Make sure the enctype is 'multipart/form-data', then have a servlet on your server read that uploaded data, write it to a file on your server local disk, and then you can do whatever you want with it from there.

          Try googling for "uploading a file using JSP" or something along those lines. There are a lot of places to find out how to "upload" a file using Java/JSP etc.