private int getParameterAsInt(String paramName, int defVal) {
    String val = getParameter(paramName);
    System.out.println(paramName + " = " + val);
    if (val != null) {
      try {
	return Integer.parseInt(val);
      } catch (Exception e) {
	System.out.println("Can not parse value: " + val);
      }
    }
    return defVal;
  }