I submit a filled-up form, like login.jsp, to the action, which checks to see whether the name/password pair represents a valid user. In case it is not, the action will forward to the same page, login.jsp. But suprisingly, the form is still filled up, with original user input. How this happened? I actually didn't expect.
posted 10 years ago
That's one of the cool things about Struts and the <html:text> and other <html:xxx> tags. They take their values from the ActionForm bean and populate the ActionForm when submitted. This means that if a page is returned because of validation errors, the fields will retain their values.