Here is my ApplicationResource.properties file used ...../classes directory
errors.header=<ul> errors.footer=</ul><hr> errors.id.required=id is required. --------------------------------------------------------------------------- Here is my validate() function if (id == null || id.equals("123") == false) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.id.required", "id=123")); } --------------------------------------------------------------------------- Here is my jsp file <h1>Hello, STRUTS! Enter ID:</h1> <hr> <html:errors /> <html:form action="/saveIdForm"> --------------------------------------------------------------------------- Did I miss something? Thanks, --------------------------------------------------------------------------- Henry Lu MCIT phone: (734) 936-2063 University of Michigan Medical Center fax: (734) 763-4372 On Tue, 5 Feb 2002, Pavel Nejedly wrote: > On Tue, Feb 05, 2002 at 12:30:25PM -0500, Henry Lu wrote: > # Here is my code: > # errors.add(ActionErrors.GLOBAL_ERROR, > # new ActionError("error.id.required", "id=123")); > > then you have to provide message for the key "error.id.required". > check the content of the file you specified as application parameter > of the ActionServlet. > eg. if you have > > <servlet> > <servlet-name>action</servlet-name> > <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> > <init-param> > <param-name>application</param-name> > <param-value>my.Msg</param-value> > > then the properties file should be one of WEB-INF/classes/my/Msg.properties, > WEB-INF/classes/my/Msg_xx.properties or WEB-INF/classes/my/Msg_xx_YY.properties > where xx_YY is the current locale > > the appropriate properties file should contain > > error.id.required=You must supply a valid id. > > or something like this. > > Does it help? > > # Could you send me part of your code? > > it looks the same... :) > > Pavel > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>