• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"));
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should reset validatorResults
 
ela san
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic