This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ActionError error  RSS feed

 
sudha javvadi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am getting an error as follows:
ActionError cannot be resolved to a type


My validate method is as follows:
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){
ActionErrors errors=new ActionErrors();
if(firstName==null || firstName.trim().equals("")){
errors.add("firstName",new ActionError("userRegistration.firstName.problem"));
}
return errors;
}
I am using struts 1.3.8,Eclipse IDE,tomcat6. I have no clue what the error is.please help.

Thanks in advance,
sudha.
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudha,

ActionError was deprecated in 1.2.0, and removed with Struts 1.3.

Use ActionMessage instead.

Since ActionErrors inherits from ActionMessages, you can use
ActionErrors#add(String,ActionMessage).

Check the Struts 1.3.8 API.

You'll have to refer to the 1.2.* API to see the information about deprecating ActionError.
[ April 25, 2008: Message edited by: Stevi Deter ]
 
sudha javvadi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Stevi.It worked.

sudha.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!