Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation in the form bean

 
farhath farook
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i did the form validation in the form bean as follows

ActionErrors errors = new ActionErrors();
if (getId() == null || getId().length() < 1) {
ActionMessage error = new ActionMessage("error.login");
errors.add("login", error);

}

And also added the error message in the property file as well.

the same code for validation in the action class gave me the error message in the JSP, but it is not giving the error message in for the validation in the form bean
can anyone help me . because am new to struts

thanks in advance
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you mean: if the errors are showing up in the JSP what's the problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic