Meaningless Drivel is fun!*
The moose likes Struts and the fly likes ActionError error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionError error" Watch "ActionError error" New topic
Author

ActionError error

sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
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

Joined: Mar 22, 2008
Posts: 265

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 ]

There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
Thank you Stevi.It worked.

sudha.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ActionError error