jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes validation in the form bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation in the form bean" Watch "validation in the form bean" New topic

validation in the form bean

farhath farook
Ranch Hand

Joined: Aug 01, 2007
Posts: 37
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

Joined: Sep 29, 2008
Posts: 12617

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
subject: validation in the form bean
Similar Threads
plugin validator messages not printing
Probelom in Manual Validation method
Skip validation when form not submitted
Compiler error in Action class - configuring data source in struts-config.xml. Please help!
<html:errors /> not viewing