Enumeration enuParaName = null;
try
{
enuParaName = oRequest.getParameterNames();
}
catch(Exception e)
{
}
while(enuParaName != null && enuParaName.hasMoreElements())
{
String name = enuParaName.nextElement().toString();
if(name.equalsIgnoreCase("module") || name.equalsIgnoreCase("submitmyform"))
{
continue;
}
String[] values = oRequest.getParameterValues(name);
// System.out.println("name:"+name+" valuestr:"+values[0]);
htDomain.put(name, values[0]);
}
if(!htDomain.isEmpty())
{
for(Enumeration enum = htDomain.keys(); enum.hasMoreElements();)
{
String strDomain = (String)enum.nextElement();
String stPassword = (String)htDomain.get(strDomain);
}
}
jdk1.4
Map params = new HashMap();
//获得POST 过来参数设置到新的params中
Enumeration enuParaName = null;
try
{
enuParaName = oRequest.getParameterNames();
}
catch(Exception e)
{
}
while(enuParaName != null && enuParaName.hasMoreElements())
{
String name = enuParaName.nextElement().toString();
String[] values = oRequest.getParameterValues(name);
String valueStr = "";
for(int i = 0; i < values.length; i ++)
{
valueStr = (i == values.length - 1) ? valueStr + values[i]: valueStr + values[i] + ",";
}
if(BaseBean._DEBUG)System.out.println("name:"+name+" valuestr:"+valueStr);
params.put(name, valueStr);
}
jdk1.5
Map params = new HashMap();
//获得POST 过来参数设置到新的params中
Map reqParams = oRequest.getParameterMap();
for (Iterator iter = reqParams.keySet().iterator(); iter.hasNext();)
{
String name = (String) iter.next();
String[] values = (String[]) reqParams.get(name);
String valueStr = "";
for (int i = 0; i < values.length; i++)
{
valueStr = (i == values.length - 1) ? valueStr + values[i]
: valueStr + values[i] + ",";
}
if(BaseBean._DEBUG)System.out.println("name:"+name+" valuestr:"+valueStr);
params.put(name, valueStr);
}