kav@94 Ответов: 0

Как динамически передать путь к файлу из jsp в servelet


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); 


Что я уже пробовал:

i could not find the solution for doing this

0 Ответов