• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in file attachment

 
Manish Sahni
Ranch Hand
Posts: 41
Java Netscape Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers

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
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!