Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how this happeded? not expected but pleasant!

 
Ningfeng Xu
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic