0

Hi all,
I am self submitting(reloading) the jsp page using javascript but after self submitting the value in <input type="file" name=" "> disappears . I tried to retain it using <input type="file" name="exe" value="<%=value[0][1]%>" > but it is not working.
please suggest me how to retain this value.


Thaks
Ritesh

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by __avd
0

Can you please tell me why it is not possible ? as I am able to retain values in all other fields like texbox , drop down list

0

I think that the following information helps you to understand the problem with input file tag.

There are two MIME types for form information: application/x-www-form-urlencoded and multipart/form-data. The first MIME type, application/x-www-form-urlencoded, is the MIME type most everyone is familiar with and results in the Servlet API automatically parsing out name and value pairs.

The second MIME type, multipart/form-data, is the one that is usually considered difficult. The reason why is because the Servlet API does nothing to help you with it. Instead the information is left as is and you are responsible for parsing the request body via either HttpServletRequest getInputStream() or getReader().

So, when you upload a file, browser send the copy of your selected file along with file metadata - filename, size of file to the webserver and webserver forward this request to the application server.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.