tags:

views:

36

answers:

1
String fileToBeRead = "C:/Documents and Settings/Developer/Desktop/Anand exmps/Anand.xls";

I have completed a java program in which the location of a file is assigned to a string as above.

But what actually is required is, the end user should select the location of file in a JSP form that is developed using <input type="file" name="file"/> tag for file selection.

My query here is how can I make the location of the file that the user selects in the JSP form to be passed to the JAVA program that I have written already.

Gimme some ideas regarding the same. Thanks in advance. Since am a beginner in Java, elaborate answers will really help in my procedings.

+1  A: 

The input field's file type is not guaranteed to pass the entire path. In fact, IE is the only browser that does.

The file input is intended to upload the entire file to the server, not to give you the file's path.

R. Bemrose
yeah.. what can be done ?? what are all the possibilities?
LGAP