/*************************************************************************
Request를 HashMap에 저장
*************************************************************************/
public HashMap getRequestToMap(HttpServletRequest httpservletrequest) {
String strKey = "";
HashMap map = new HashMap();
for ( Enumeration e = httpservletrequest.getParameterNames(); e.hasMoreElements(); ) {
strKey = (String)e.nextElement();
map.put(strKey, httpservletrequest.getParameter(strKey));
}
return map;
}
/*************************************************************************
Request를 ArrayList에 저장
*************************************************************************/
public List getRequestToList(HttpServletRequest httpservletrequest) {
int nMaxCnt = 1;
String strKey = "";
List reqList = new ArrayList();
Object[] obj = null;
HashMap map = null;
for ( int i = 0 ; i < nMaxCnt ; i++ ) {
map = new HashMap();
for ( Enumeration e = httpservletrequest.getParameterNames(); e.hasMoreElements(); ) {
strKey = (String)e.nextElement();
obj = httpservletrequest.getParameterValues(strKey);
if ( nMaxCnt < obj.length ) {
nMaxCnt = obj.length;
}
if ( nMaxCnt >= i + 1 ) {
map.put(strKey, obj[i]);
}
}
reqList.add(map);
}
return reqList;
}