public String getUrl(HttpServletRequest request)
{
String parameterList = "";
String ret_url = request.getRequestURI(); // No Parameter url
int k=0;
for (java.util.Enumeration e = request.getParameterNames(); e.hasMoreElements() ;k++) {
String name = (String) e.nextElement();
String[] value = request.getParameterValues(name);
if (k == 0) ret_url = ret_url + "?";
else if (k>0) ret_url = ret_url + "&";
parameterList = parameterList + "&";
for (int q=0; q<value.length;q++){
if (q>0) {
ret_url = ret_url + "&";
parameterList = parameterList + "&";
}
ret_url = ret_url + name + "=" + value[q];
parameterList = parameterList + name + "=" + value[q];
}
}
String result=ret_url;
return result;
}
댓글 없음:
댓글 쓰기