I checked my web.xml and did not see message-resources being defined there. Do you have any other idea where I might do wrong. I am really stuck with this problem now. Vivien
-----Original Message----- From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] Sent: Fri 10/10/2003 9:55 AM To: Struts Users Mailing List Cc: Subject: Re: Please help with this error "???en_US.errors.required???" Hi Vivien, Take a look at your web.xml. Maybe you copied it from Struts dist and message-resources was already configured there. As settings in web.xml will override settings in struts-config.xml, classloader can't find resource to be loaded and then you get that messages. Hope i helped you. Kind regards, Daniel. --- "Chen, Vivien" <[EMAIL PROTECTED]> wrote: > I have a login.jsp which I use DynaValidatorForm. Both the username and password are > required > fields. When I submited the page without entering these data, I got > "???en_US.errors.required???" and "???en_US.errors.required???". It looks like the > validation > was peformed because I got two error.required messages but I don't understand why it > was not > able to print the accurate message. please help. Thanks in adavance. > > In xxxResources.properties: > errors.required={0} is required. > errors.minlength={0} cannot be less than {1} characters. > errors.maxlength={0} cannot be greater than {2} characters. > ... > > In struts-config.xml: > <form-beans> > <!-- Login form bean --> > <form-bean name="loginForm" > type="org.apache.struts.validator.DynaValidatorForm"> > <form-property name="username" type="java.lang.String"/> > <form-property name="password" type="java.lang.String"/> > </form-bean> > </form-beans> > > <message-resources parameter="xxxResources"/> > > I packaged the xxxResource.properties in my xxx.war: > WEB-INF/classes/xxxResources.properties > > In Validation.xml: > <form-validation> > <formset> > <form name="loginForm"> > <field property="username" depends="required,minlength,maxlength"> > <arg0 key="prompt.username"/> > <arg1 key="${var:minlength}" name="minlength" resource="false"/> > <arg2 key="${var:maxlength}" name="maxlength" resource="false"/> > <var> > <var-name>maxlength</var-name> > <var-value>16</var-value> > </var> > <var> > <var-name>minlength</var-name> > <var-value>3</var-value> > </var> > </field> > ...... > </form> > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

