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 getting the full file path 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 file path from FormFile" Watch "getting the full file path from FormFile" New topic
Author

getting the full file path from FormFile

Steve Ashton
Greenhorn

Joined: Sep 04, 2002
Posts: 5
Hi, I am reading in a .csv file from my JSP page and I want to pass the String path from my Action class to the logic layer class. When I try and pass it at the moment, it throws an FileNotFound error as it is only passing the file name. i.e
Passing
text.csv
not
C:\text.csv
Is there anyway of detirming the full file path using the FormFile class?
Thanks in advance
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Here is a method I use to handle uploading a file using the commons libraries from Apache. You should be able to see how to get what you want out of it (and more).
 
Have you checked out Aspose?
 
subject: getting the full file path from FormFile
 
It's not a secret anymore!