File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes File Upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "File Upload" Watch "File Upload" New topic
Author

File Upload

binu narayanan
Ranch Hand

Joined: Jul 24, 2009
Posts: 56
Hi Every one,

Iam uploading the file using inbuit tag of html ie <html:file></html:file>. I would like to get the source files actual path details if any one can help me out on this
Thank you
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

"Actual path" meaning what? The actual path on the *client* side? That's browser-dependent, some browsers only send the file name.
binu narayanan
Ranch Hand

Joined: Jul 24, 2009
Posts: 56
Yes the client side file path is what iam looking for. The browser main in use for this application is IE
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If I remember correctly (which is unlikely, I haven't used Struts 1 for around five years) the FormFile object contains the name; I don't recall if it has the entire contents of the path supplied by the browser (bearing in mind that not all browsers return the complete path; sniffing the request would answer that question).
binu narayanan
Ranch Hand

Joined: Jul 24, 2009
Posts: 56
Thank you for the help.

I got it fixed through JavaScript and got the full client side path of the file browsed for.
 
 
subject: File Upload
 
Similar Threads
how to upload multiply file using struts 1.1?
Problem with validating
Validate problem in addition to resetting chosen values?
How to apply the filter for file selection
How can I upload multiple files using html:file