public static String getRequestParameters( HttpServletRequest aRequest)
{
StringBuffer aReturn = new StringBuffer("");
Enumeration parameterNames = aRequest.getParameterNames();
while (parameterNames.hasMoreElements()) {
String requestParameter = (String) parameterNames.nextElement();
String[] aValues = aRequest.getParameterValues(requestParameter);
for (int i = 0; i <> 0) {
aReturn.append("&");
}
aReturn.append(requestParameter);
aReturn.append("=");
aReturn.append(aValues[i]);
}
}
return aReturn.toString();
}
}
I wanted a place where I can post technical articles only. This is the place to find out my tips and tricks for being a Java web applications developer. I hope it helps you.
Wednesday, February 04, 2004
request parameters
very useful snippet:
No comments:
Post a Comment