• 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

Error Message for Struts Validation

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use the validation.xml to validate the properties in my form bean. The validation works; but, the error messages do not work as I expected.

While I have customized error messages prepared, the error message displayed in the browser window for my intentional violation are like:
. null is required
. null is required

I also wonder how to show error messages if there are more than one validation check for a certain property. For example, depends="required,mask".

For example, in my validation.xml, I have:

In my web.xml, I have:

and the application.properties file is in the C:\jakarta-tomcat-5.0.27\webapps\AppName\WEB-INF\classes\resources directory.

In the application.properties, I have:
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, so you dident put
<message-resources parameter="blabla.ApplicationResources"/>
in your struts-config file ?
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic