• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot process ActionErrors instance of class

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic