How to clear the form after submitting the values?

17,647

You can override Struts' Action reset() method and after you used it in your action you can do form.reset(request, response); and do a forward. That way, your form is resetted.

Share:
17,647
priya
Author by

priya

Updated on June 05, 2022

Comments

  • priya
    priya almost 2 years

    I have a form with few filed. Once i submit the form the data is stored in database and i will return to the same page. Now, How to clear the fields in the form??

    It is a struts based application. On submit it does some validations using java script then forwarded to the same page. Now, I must get a fresh page. I mean the fields must be cleared.