回覆列表
  • 1 # 使用者1158134898603

    直接上程式碼,僅供參考:

    private void showParams(HttpServletRequest request) {

    Map map = new HashMap();

    Enumeration paramNames = request.getParameterNames();

    while (paramNames.hasMoreElements()) {

    String paramName = (String) paramNames.nextElement();

    String[] paramValues = request.getParameterValues(paramName);

    if (paramValues.length == 1) {

    String paramValue = paramValues[0];

    if (paramValue.length() != 0) {

    map.put(paramName, paramValue);

    }

    }

    }

    Set<Map.Entry<String, String>> set = map.entrySet();

    System.out.println("------------------------------");

    for (Map.Entry entry : set) {

    System.out.println(entry.getKey() + ":" + entry.getValue());

    }

    System.out.println("------------------------------");

    }

  • 中秋節和大豐收的關聯?
  • 素質測評技術在人員招聘中的作用體現在哪些方面?