import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.mdcl.mocha.fe.developer.template.util.TemplateUtil;
public class ParamUtil {
/**
* 把request取到的参数放到一个Map中
* @param request
* @return
*/
public static Map parseRequest(HttpServletRequest request){
Map map = new HashMap();
String key = null;
String value = null;
for(Enumeration enumeration = request.getParameterNames(); enumeration.hasMoreElements(); map.put(key, value))
{
key = (String)enumeration.nextElement();
String as[] = request.getParameterValues(key);
value = as[0];
for(int i = 1; i < as.length; i++)
value = value + "," +as[i];
}
return map;
}
}