Register / Login
Win a copy of
Java EE 8 High Performance
this week in the
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
How to pass the file path dynamically from jsp to servelet dynamically
posted 8 months ago
I am using a file uploader to choose the file and i need to pass that file path to my
dynamically instead of giving the file path statically how can i do this.Below is my
<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();
posted 7 months ago
Why do you need path? why do you need client file path on server?
you submit your request you will be having file content on server along with file name, now its upto you to what path you want to save it.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
Boost this thread!
How to store a particular data into project file
Is there any way to do check how many files the user have uploaded?
request.getParameter() returning null
File Name equals Null for input type file