您的位置:首页 > 产品设计 > UI/UE

JSP中request.getParameterNames和getParameterValues应用

2007-01-16 15:49 495 查看



try...{


String name;


Enumeration pNames=request.getParameterNames();




while(pNames.hasMoreElements())...{


name=(String)pNames.nextElement();


out.print(name+"="+request.getParameter(name));


}




}catch(Exception e)...{


out.print(e.toString());


}









for (Enumeration iter = request.getParameterNames(); iter.hasMoreElements();) ...{


String element = (String) iter.nextElement();


logger.debug("parameter:"+element);


logger.debug("value:"+request.getParameter(element));


}




String[] userId = request.getParameterValues("userId");

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: