I am trying to upload a file in jsp to my website server .
The problem i am facing is that in advance browser the path of the file is been shown as "fakepath"or the filename only and not the complete path.
I am uploading the file in the server but its not been executed as the file path is unknown to the mail api.
Please let me know the solution
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
Can you describe a bit clearer what the problem is? Does it have to do with file upload, or does it have to do with sending a mail? Those are unrelated activities, so I'm pretty sure it can't have to do with both at the same time.
Most browsers don't send the file path, only the file name. And that shouldn't be a problem either. After all, the server can't access the file on the client system*. The file now has a different path (in PHP at least), or is stored in the request / memory only (servlets). I suggest you use Apache's FileUpload library for this.
* Well, if the web server is on your local PC it might, but let's assume it can't.