1. 继承DefaultTypeConverter(实现了ognl.TypeConverter接口)。修改如下方法:
public Object convertValue(Map<String, Object> context, Object value, Class toType) {
return convertValue(value, toType);
}
2. 继承StrutsTypeConverter。该类有两个抽象方法:
public abstract class StrutsTypeConverter extends DefaultTypeConverter
public abstract Object convertFromString(Map context, String[] values, Class toClass);
public abstract String convertToString(Map context, Object o);