• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Cannot process ActionErrors instance of class

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 ?

pie sneak
Posts: 4727
Mac VI Editor Ruby
  • 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 destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic