Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActionError error

 
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic