wood burning stoves*
The moose likes Struts and the fly likes how this happeded? not expected but pleasant! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how this happeded? not expected but pleasant!" Watch "how this happeded? not expected but pleasant!" New topic
Author

how this happeded? not expected but pleasant!

Ningfeng Xu
Greenhorn

Joined: Jan 22, 2002
Posts: 18
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.


SCJP2
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
jQuery in Action, 2nd edition
 
subject: how this happeded? not expected but pleasant!