is it possible to clear struts2 file input tag?
I am using Struts2 for a web application development. i have this particular problem for which i couldnt find a solution even after i googled.
I have 3 tags with a hyperlink or button against each, which has to be used to clear the filepath if anything was previously selected. The solution which was found online was to reset the form.. but then all the s:file tags will be cleared since all tags need to be in the same form.
Is there any way to clear a single file input on some click??
One solution similar to what we've used is to remove the input element and create a new input element in its place, with the same name.
EDIT: Here's an example I threw together.