code: public static String getStringInitParameter(ExternalContext context, String name, String defaultValue)
      {
          if (name == null)
          {
              throw new NullPointerException();
          }
          
          String param = context.getInitParameter(name);
          
          if (param == null)
          {
              return defaultValue;
          }
  
          param = param.trim();
          if (param.length() == 0)
          {
              return defaultValue;
          }
  
          return param;
      }
docs: Gets the String init parameter value from the specified context. If the parameter is an empty String or a String
  containing only white space, this method returns <code>null</code>
  
  @param context
  the application's external context
  @param name
  the init parameter's name
  @param defaultValue
  the value by default if null or empty
  
  @return the parameter if it was specified and was not empty, <code>null</code> otherwise
  
  @throws NullPointerException
  if context or name is <code>null</code>