2

I need absolute path for the uploaded file. I tried with out enctype,it only returns the file name by request.getParameter.Tried javascript also return a freaky path. I know this is for security reason. Is there any way i can get the file location? .

Html code is <form action="test.jsp" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" ><br> <input type="submit" name="submit" value="Submit"> </form> 
4
  • 2
    To tell u d truth there is no way to get the location of the file. Commented Jan 22, 2014 at 7:25
  • Absolute location on client machine? Why do you need this? This sounds a little bit strange. Could you explain your root problem? Commented Jan 22, 2014 at 7:26
  • i am uploading a csv file,i only need the file name to update the table contain.it works with default eclipse browser but not in chrome or firefox Commented Jan 22, 2014 at 7:29
  • 1
    possible duplicate of Uploading a file in Java Servlet Commented Jan 22, 2014 at 7:44

1 Answer 1

-1

done some patch up work.hard code the specific folder location and append the file name.so my limitaion is the file should come from that particular folder

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.