This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is struts calling reset???

 
Dennis John
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a setup action which pre-populates a form and forwards it to a jsp page which displays the form. When the user submits the form it calls validate and if validate fails, reset for my ActionForm gets called before the jsp page is re-loaded.
I have my input attribute set to the same page that displays the form so I thought reset wouldn't get called again since it is part of the same request. The problem is my collection for my optionsCollection tag is going out of scope (or something) and I am getting an exception error.
Can anyone help me figure out what I am doing wrong???
-Dennis
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reset method gets called on an ActionForm before it gets populated with the values from the request. Validate is called after the ActionForm is populated.
 
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!