hold data in the form

Hello,

i have a form( start.jsp) in which i can enter data about a person. The form data is bound to a person class which is saved in db. After submitting the form i inform the user ( in another page) that the submitting were successfull. But after coming back to the start.jsp to create a new person i still have the old person information data in the form. How can I have a form without my previous data.

My bean has to be in session scope and not in request scope.

thanks

[499 byte] By [hamidagaa] at [2007-11-26 20:20:26]
# 1

Reinstantiate the Form DTO.

public void submitForm() {

...

myForm = new MyForm(); // Clears the form.

}

BalusCa at 2007-7-10 0:44:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
well, there is no object of myForm.The form is bound to a backing bean (Person with setter and getter methods).and this person is saved into db.
hamidagaa at 2007-7-10 0:44:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
It's your design choice. But all what I want to say is that you have to clear your 'form'. In this case, clear the Person.
BalusCa at 2007-7-10 0:44:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
yes ,yes . i got it, of course.Thanks once more!
hamidagaa at 2007-7-10 0:44:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...