clear actionforms in actions - struts
843838Mar 29 2006 — edited Mar 29 2006i add details in a database from a jsp using struts. now when i come to my action i store the data and want to go back to the same page. but before i do that the existing data in my actionform i need to clear it otherwise the existing data will persist in the jsp form.
so i would like to know how to clear it
A sample code is
public class ActionNew extends Action {
public execute(ActionForm form, actionMapping map .......) {
//get the actionform
Prop prop = (Prop)form;
//store data
//clear the form -- please give this code
}
}
if there is any other solution please
thanks in advance