Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validate method with resource file reference?

 
Liz Brown
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following validate. I have a resource bundle i need to give since my application has more than 1 properties files. How to mention it here?

public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
ActionErrors errors = new ActionErrors();

if(newId==null || newId.trim().equals("")){
errors.add("newId",new ActionError("userRegistration.newId.problem"));
//this is a key, put the value i.e. the message in properties file
}




return errors;
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic