struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soomar, Muki (R.)" <>
Subject Using a resource file for managing Form errors
Date Thu, 13 Jun 2002 19:21:24 GMT
I am trying to use a separate resource file for managing errors coming out of the form validation
in an ActionForm. How do I access this resource file? This is a second resource file defined
in my
struts-config.xml file.

Steps taken so far:
1. Defined a Message Resource in the struts-config.xml file as follows:
	<message-resources parameter="com.myDomain.RegistrationFormResources" />

2. Dont have a clue how to utilize this in the ActionForm's Validate method. Tried doing this..

	if ((addressLine_1 == null) || (addressLine_1.length() < 1))
		errors.add("addressLine_1", new ActionError("error.RegistrationForm.addressLine_1.required"));

I checked the archives for finding out the answers, but could not find any.

Any help will be much appreciated.

Muki Soomar

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message