Map<String, Object> bindStrutsContext(Object action) {
		Map<String, Object> variables = new HashMap<String, Object>();
		variables.put(ACTION_VARIABLE_NAME, action);

		if ( action instanceof ActionSupport) {
			ActionSupport actSupport = (ActionSupport)action;

			// Struts2 field errors.( Map<fieldname , fielderrors>)
			Map<String, List<String>> fieldErrors = actSupport.getFieldErrors();
			variables.put(FIELD_ERRORS_NAME, fieldErrors);
		}

		return variables;
	}
Map < String , Object > bindStrutsContext ( Object action ) { Map < String , Object > variables = new HashMap < String , Object > ( ) ; variables . put ( ACTION_VARIABLE_NAME , action ) ; if ( action instanceof ActionSupport ) { ActionSupport actSupport = ( ActionSupport ) action ; Map < String , List < String > > fieldErrors = actSupport . getFieldErrors ( ) ; variables . put ( FIELD_ERRORS_NAME , fieldErrors ) ; } return variables ; }
Binding Struts2 action and context, and field-errors list binding "field".
@param action Action instance
@return ContextMap