aspose file tools*
The moose likes Struts and the fly likes struts servlet -  old Error message on the previous submission has been added to current error messa Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts servlet -  old Error message on the previous submission has been added to current error messa" Watch "struts servlet -  old Error message on the previous submission has been added to current error messa" New topic
Author

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

ela san
Greenhorn

Joined: Dec 08, 2010
Posts: 2
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

Joined: Nov 03, 2010
Posts: 19
You should reset validatorResults
ela san
Greenhorn

Joined: Dec 08, 2010
Posts: 2
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: struts servlet - old Error message on the previous submission has been added to current error messa