• 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

Validator not picking up error message resources

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a web application, wherein I'm using DynaValidatorForm.In validation.xml file, I set up required rules for few fields in 2 form beans, both of which are DynaValidator Forms. On one jsp page, I see the error message when I try to submit without entering a value for a required field. On the second jsp page, the rule is getting triggered, but the message is not being displayed on the jsp page. The message for both required rules in both forms come from the default validation error message : errors.required
In struts logs, for the first page, I see that the framework is getting the error message suffix, prefix, header, footer etc. But, when I invoke the second jsp page, I don't see logs about getting resources for the errors. How is it that on one jsp page, the errors are getting displayed, while on the other, they are not ?

Any hints will be very useful.

Thanks,
Mallika.
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check your case spellings. do side-by-side comparisons of the JSP's, action mappings, forms, etc.

make sure you have <html:errors/> added to the second jsp and the tag-lib declared. if you did both already, make sure the redirect attribute of your forward is set to 'false' if the action mapping specified to form to remain only in request.
 
Mallika R Kumar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Alan - the redirect was not pointing to failure!
 
reply
    Bookmark Topic Watch Topic
  • New Topic