File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation in the form bean

 
farhath farook
Ranch Hand
Posts: 37
  • 0
  • 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
  • 0
  • 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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic