This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes Need fetch fullpath of a file uploaded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need fetch fullpath of a file uploaded" Watch "Need fetch fullpath of a file uploaded" New topic
Author

Need fetch fullpath of a file uploaded

Jiya Khan
Greenhorn

Joined: Jul 07, 2009
Posts: 3
Hi,

I want full path of the image uploaded through struts file upload.

AbcForm frm= (AbcForm)form;

FormFile image1 = galform.getTheFile1();

image1 is giving only filename. but i want full path of that file like "C:\temp\DSC00263.JPG";

could anybody please tel how can i do it..

Regards,
jiya
shirish katti
Ranch Hand

Joined: Nov 09, 2009
Posts: 34
Using java it is very easy..

You can get the path of a file as below

File f=new File("fileName");
system.out.println(f.getAbsolutePath());
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need fetch fullpath of a file uploaded
 
Similar Threads
how to set the file path in struts for file upload
Download pdf file in struts2
how to handle file uploads in spring
How to get the path of an Uploaded file?
get full path