AWStringKeyHashtable newHashtable = null;
Parameters formValues = AWBaseRequest.parameters(this);
if (formValues != null) {
String characterEncodingName =
formValues.getParameter(AWBaseRequest.CharacterEncodingKey);
AWCharacterEncoding characterEncoding = null;
if (!StringUtil.nullOrEmptyOrBlankString(characterEncodingName)) {
characterEncoding = AWCharacterEncoding.characterEncodingNamed(
characterEncodingName);
if (characterEncoding != null) {
setCharacterEncoding(characterEncoding);
}
}
// subclass might have initialized it.
characterEncoding = characterEncoding();
int elementCount = formValues.getParameterCount();
newHashtable = new AWStringKeyHashtable(
(elementCount == 0) ? 1 : elementCount);
Iterator keyEnumerator = formValues.getParameterNames();
String[] debugFilterKeys = null;
boolean isAribawebDebugEnabled = Log.aribaweb_request.isDebugEnabled();
if (isAribawebDebugEnabled) {
Log.aribaweb_request.debug("---> form values");
// check for debug filter values
debugFilterKeys = formValues.getParameterValues(AWLogFilterListKey);
}
while (keyEnumerator.hasNext()) {
String keyString = (String)keyEnumerator.next();
String[] formValuesArray = formValues.getParameterValues(keyString);
if (isAribawebDebugEnabled) {
boolean filter = false;
if (debugFilterKeys != null) {
for (int i=0, size=debugFilterKeys.length;
i < size && !filter; i++) {
filter = debugFilterKeys[i].equals(keyString);
}
}
Log.aribaweb_request.debug("name: %s, value: %s",
keyString, filter ? "**** filtered ****" :
formValuesArray.length == 1 ? formValuesArray[0] :
ArrayUtil.formatArray("",formValuesArray));
}
if (characterEncoding != null &&
!characterEncoding.equals(AWCharacterEncoding.ISO8859_1)) {
AWBaseRequest.convertStrings(formValuesArray, characterEncoding);
}
newHashtable.put(keyString, formValuesArray);
}
}