• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot process ActionErrors instance of class  RSS feed

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I am trying to do validations using the struts framework.

In Form :
I extend my form with the ValidatorActionForm of org.apache.struts.validator.ValidatorActionForm

Then I put a validate () method in the form.

public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
ActionErrors errors = super.validate(mapping, request);
return errors;
}

In JSP :
for the <html:text.... >
<html:errors property="bean.name" name="form"/>


I put entries for the validation.xml and validator-rules.xml in the struts-config.xml.
Also in struts define the application.properties file.

In the struts-config.xml
the 1st mapping to this page i say validate="false" but for the next mapping i say validate="true"

SO when the 1st URL is typed in the browser address bar i get this ServletException :
Cannot process ActionErrors instance of class

CAn anyone please tell me what the problem is ?

Thanks,
Gayatri
 
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Try leaving out the name attribute of html:errors. Many of the Struts tags don't do what you'd expect when specifying name.
if that doesn't fix it,
2) Try removing the html:errors tag altogether to see if it is the culprit. This will help to pinpoint where the error is coming from.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!