servlet之doPost获取表单参数

	/**
	 * 获取表单参数
	 */
	private void readForm() {
		// TODO Auto-generated method stub
		Enumeration e = request.getParameterNames();
		while (e.hasMoreElements()) {
			String parameterName = (String) e.nextElement();
			String parameterValue= request.getParameter(parameterName);
			request.setAttribute(parameterName, parameterValue);
		}
		
	}

你可能感兴趣的:(servlet之doPost获取表单参数)