• 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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!