This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 60
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: 60
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: 60
Thank you for the help.

I got it fixed through JavaScript and got the full client side path of the file browsed for.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: File Upload
 
It's not a secret anymore!