Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using a file uploader to choose the file and i need to pass that file path to my servlet dynamically instead of giving the file path statically how can i do this.Below is my jsp code

<label for="fileName">Select File: </label>
            <input id="fileName" type="file" name="fileName" size="30"/> <br/>
<input type="submit" value="Upload"/>     

Below  is my servlet code where i am passing the path statically how can i pass dynamically

File file = new File("C:Desktop\\test.ods");
            Upload objODSReader = new Upload();
            objODSReader.readODS(file); 


What I have tried:

i could not find the solution for doing this
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900