posted 15 years ago
In Struts higher versions (above 1.2.0 i guess ), the usage of ActionError is depricated, hence the following code will help to resolve it if you want ,
Use your code similar to the following in your action class to add the action errors,
ActionErrors errors = null;
errors = (ActionErrors) request.getAttribute(Globals.ERROR_KEY);
if (errors == null) {
errors = new ActionErrors();
}
errors.add("Global Error message", new ActionMessage("error.provided.in propertiesfile"));
request.setAttribute(Globals.ERROR_KEY, errors);