获取from表单提交数据 返回map

/**
* 获取from表单提交数据,
* @author shu
*
*/
public class WebUtil {
public static Map<String,String> getRequestMap(HttpServletRequest request) {
Map<String,String> map=new HashMap<String,String>();
Enumeration<String> en=request.getParameterNames();
while(en.hasMoreElements())
{
String parameterName=en.nextElement();
map.put(parameterName,  request.getParameter(parameterName));
}
return map;
}

}

你可能感兴趣的:(表单提交)