I'm not trying to do multiple resources based on locale but it appears that the resource key that it is trying to find is en_US.validate.FirstName.incomplete when the resource that i'm calling is simply validate.FirstName.incompleteb (why is it prefacing it)... i've put it in ApplicationResources and ApplicationResources_en_US properties files, i've prefaced the key=value pairs in the resource file with en_US. to see if they'll match... i just added the locale key that you mentioned and still the same bloody error messages... this is making me absolutely nuts...
do i have to do more then simply start and stop the local tomcat server? does it have anything to do with the fact that i am using the ActionErrors GLOBAL_MESSAGE value as the key for all my values?
I've put the following in my servlet parameters in web.xml
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
This is the message resource portion of my struts-config.xml file
<message-resources parameter="ApplicationResources" null="false"/>
and the items mentioned above are in both ApplicationResources.properties and ApplicationResources_en_US.properties files in the /WEB-INF/classes directory.
********************************************************************
my ActionForm
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request) {
int confirm = 0;
com.x.validation.Validate validateThis = new com.x.validation.Validate();
org.apache.struts.action.ActionErrors messages = new org.apache.struts.action.ActionErrors();
if(request.getParameter("firstName").trim().length() == 0){
confirm += 1;
messages.add(messages.GLOBAL_MESSAGE, new org.apache.struts.action.ActionMessage("validate.FirstName.incomplete"));
}
if(request.getParameter("lastName").trim().length() == 0){
confirm += 1;
messages.add(messages.GLOBAL_MESSAGE, new org.apache.struts.action.ActionMessage("validate.LastName.incomplete"));
}
if(request.getParameter("address").trim().length() == 0){
confirm += 1;
messages.add(messages.GLOBAL_MESSAGE, new org.apache.struts.action.ActionMessage("validate.Address.incomplete"));
}
if(request.getParameter("phone").trim().length() == 0){
confirm += 1;
messages.add(messages.GLOBAL_MESSAGE, new org.apache.struts.action.ActionMessage("validate.Phone.incomplete"));
}
if(!validateThis.email(request.getParameter("email"))){
confirm += 1;
messages.add(messages.GLOBAL_MESSAGE, new org.apache.struts.action.ActionMessage("validate.Email.incomplete"));
}
if(confirm > 0){
return messages;
} else {
return null;
}
}
***********************************************************************
why can't we just state everything in a bloody java class... at least the errors would give me something to track down
i'm praying for a null pointer exception right now
[ May 23, 2005: Message edited by: Billy Bob ]