• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to pass the file path dynamically from jsp to servelet dynamically  RSS feed

 
kavitha vemula
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
mohammad shadab
Ranch Hand
Posts: 62
Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!