This question was already answered in other threads, I think that any of this 2 can help you:
How to get full path using <input id="file" name="file" type="file" size="60" > in jsp
How to get full path of file using input type file in javascript?
Just to complete my answer a bit more and since you added the java tag to it, here I will include you a little snippet of code that shows some of the most common information you can get out of a file, but from the java perspective:
package test;
import java.io.File;
import java.io.IOException;
public class FilePaths {
public static void main(String[] args) throws IOException {
String[] fileArray = {
"C:\\projects\\workspace\\testing\\f1\\f2\\f3\\file5.txt",
"folder/file3.txt",
"../testing/file1.txt",
"../testing",
"f1/f2"
};
for (String f : fileArray) {
displayInfo(f);
}
}
public static void displayInfo(String f) throws IOException {
File file = new File(f);
System.out.println("========================================");
System.out.println(" name:" + file.getName());
System.out.println(" is directory:" + file.isDirectory());
System.out.println(" exists:" + file.exists());
System.out.println(" path:" + file.getPath());
System.out.println(" absolute file:" + file.getAbsoluteFile());
System.out.println(" absolute path:" + file.getAbsolutePath());
System.out.println("canonical file:" + file.getCanonicalFile());
System.out.println("canonical path:" + file.getCanonicalPath());
}
}