code: public static int getStyle(String style, String errCode)
              throws JspException {
          int ret = DateFormat.DEFAULT;
  
          if (style != null) {
              if (DEFAULT.equalsIgnoreCase(style)) {
                  ret = DateFormat.DEFAULT;
              } else if (SHORT.equalsIgnoreCase(style)) {
                  ret = DateFormat.SHORT;
              } else if (MEDIUM.equalsIgnoreCase(style)) {
                  ret = DateFormat.MEDIUM;
              } else if (LONG.equalsIgnoreCase(style)) {
                  ret = DateFormat.LONG;
              } else if (FULL.equalsIgnoreCase(style)) {
                  ret = DateFormat.FULL;
              } else {
                  throw new JspException(Resources.getMessage(errCode, style));
              }
          }
  
          return ret;
      }
docs: /*
  Converts the given string description of a formatting style for
  dates and times to the corresponding java.util.DateFormat constant.
  
  @param style String description of formatting style for dates and times
  @param errCode Error code to throw if given style is invalid
  
  @return java.util.DateFormat constant corresponding to given style
  
  @throws JspException if the given style is invalid