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

struts servlet - old Error message on the previous submission has been added to current error messa

 
ela san
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am a sr web developer working on struts , my issue is that the old Error message on the previous submission has been added to current error message and been displayed to Jsp , my form bean is in session scope , i am using the validate method for doing this validation, anybody having any idea about why the err msg adding with the previous requst submission err msg ?

this is my code

actionErrors.add(actionErrors.GLOBAL_MESSAGE, new ActionMessage("errors.SummaryForm.actioPlanDesc.NoOfCharInvalid"));
 
Radovan Vukovic
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should reset validatorResults
 
ela san
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , i have cleared the validatorresult at the start of my validate method , also tryed reset() , no use , below is my code

ValidatorResults result = getValidatorResults();
result.clear();

can you suggest me how to do this ? , or tell me some other way to clear those error message , any how i am checking my ActionErrors size before returning it from validate() , its showing the exact no of msg which was invoked by the current request submission
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic