protected String formatDate(Date date,String formatKey,int defaultFormat){
  Locale locale=getLocale();
  DateFormat dateFormatter;
  String formatString=getString(formatKey);
  if (StringUtils.isEmpty(formatString)) {
    dateFormatter=DateFormat.getDateInstance(defaultFormat,locale);
  }
 else {
    dateFormatter=new SimpleDateFormat(formatString,locale);
  }
  return dateFormatter.format(date);
}

protected String formatDate ( Date date , String formatKey , int defaultFormat ) { Locale locale = getLocale ( ) ; DateFormat dateFormatter ; String formatString = getString ( formatKey ) ; if ( StringUtils . isEmpty ( formatString ) ) { dateFormatter = DateFormat . getDateInstance ( defaultFormat , locale ) ; } else { dateFormatter = new SimpleDateFormat ( formatString , locale ) ; } return dateFormatter . format ( date ) ; }
metodo de utilidad para formatear fechas .
