code: public static String getServletParameter(ServletConfig conf, String name, Set<GetOpts> opts, String defaultValue)
  	{
  		String ret;
  
  		if(conf == null)
  			throw new NullPointerException("ServletConfig cannot be null");
  		if(name == null)
  			throw new NullPointerException("name cannot be null");
  		if(opts == null)
  			opts = EMPTY_OPTS;
  		if((ret = conf.getInitParameter(name))!=null)
  			return ret;
  		if(opts.contains(GetOpts.THROW_ON_MISSING))
  			throw new IllegalStateException("The servlet init paramter " + name + " is required but wasn't set.");
  		if(opts.contains(GetOpts.LOG_ON_MISSING))
  			logger.warn("The servlet init paramter {} is expected but wasn't set.", name);
  		return defaultValue;
  	}
docs: /* getServletParameter(ServletConfig...)