jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Getting the full pathname from FormFile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting the full pathname from FormFile" Watch "Getting the full pathname from FormFile" New topic
Author

Getting the full pathname from FormFile

Clarence Dyho
Greenhorn

Joined: Sep 17, 2001
Posts: 23
Hello.

I used the <html:file> tag provided by Struts for file upload. However, I need to check if the file actualy exist before I do the transfer so I need the full path and file name. Could anyone tell me how I could get this? The getFileName() method of FormFile only returns the base file name.

I read somewhere that the Jakarta commons upload class such as the CommonsMultipartRequestHandler can be used to get the full file name. Can't seem to make it work and I can't find any examples. Also tried to look for threads with similar subject here but most of them have no replies.

Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting the full pathname from FormFile
 
Similar Threads
Can't get details on form file...
Upload all the files in the directory to server
absolute path Formfile upload
Get path of file uploaded
html:file problem