How to retain value in <input type="file" name=" "> after self submitting (reload)

Reply

Join Date: May 2009
Posts: 2
Reputation: ritesh399 is an unknown quantity at this point 
Solved Threads: 0
ritesh399 ritesh399 is offline Offline
Newbie Poster

How to retain value in <input type="file" name=" "> after self submitting (reload)

 
0
  #1
May 28th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: How to retain value in <input type="file" name=" "> after self submitting (reload)

 
0
  #2
May 28th, 2009
It is not possible.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 2
Reputation: ritesh399 is an unknown quantity at this point 
Solved Threads: 0
ritesh399 ritesh399 is offline Offline
Newbie Poster

Re: How to retain value in <input type="file" name=" "> after self submitting (reload)

 
0
  #3
May 28th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: How to retain value in <input type="file" name=" "> after self submitting (reload)

 
0
  #4
May 28th, 2009
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.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC