TrainBeaser for iPhone
The moose likes Other JSE/JEE APIs and the fly likes problem in file attachment Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "problem in file attachment" Watch "problem in file attachment" New topic
Author

problem in file attachment

manish sahni
Ranch Hand

Joined: Sep 09, 2009
Posts: 33

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

Joined: Oct 14, 2008
Posts: 1337
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
Saloon Keeper

Joined: Oct 27, 2005
Posts: 17259

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.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
jQuery in Action, 2nd edition
 
subject: problem in file attachment
 
developer file tools