How can I retain HTML form field values in JSP after submitting form to Servlet?
I am trying to retain a csv file in the jsp but it looks not possible. I also tried to pass the csv file back to the jsp and send it as a part of form back to the controller but not able to do it. so please suggest a way to retain the csv file or redirect it back to the jsp and be able to use the second time the page reloads
I have done some research and came to a conclusion that it is not possible to retain an input field of type csv file. Please correct me if I am wrong
Answer: As per my knowledge it is not possible as suggested in this https://stackoverflow.com/questions/2598904/how-do-i-keep-form-data-after-submitting-the-form-using-javascript#:~:text=To%20keep%20the%20values%2C%20you,request%20parameters%20into%20the%20fields.&text=You%20can%20use%20cookies%20from,you%20access%20something%20called%20document. answer once the form is submitted the entire page is replaced by response from the server so to retain the csv file values I think we can only use an jQuery.post or jQuery.ajax to send the form data rather than actually submitting the form