private String getReturnUrl(HttpServletRequest request) { StringBuffer buffer = new StringBuffer(); buffer.append(request.getRequestURI()).append("?").append(request.getQueryString());  return buffer.toString();
private String getReturnUrl(HttpServletRequest request, String referer) { java.util.Map parameters = request.getParameterMap(); StringBuffer hiddenField = new StringBuffer(); int indexOfInterrogationMark = referer.indexOf("?"); if (indexOfInterrogationMark == -1) { hiddenField.append(referer); hiddenField.append("?"); } else { hiddenField.append(referer.substring(0, indexOfInterrogationMark)); } int total = 0; for (Object key : parameters.keySet()) { if (total > 0) { hiddenField.append("&"); } if (!key.equals("returnMethod") && !key.equals("method") && !key.equals("returnURL") && !key.equals("group") && key instanceof String) { String keyString = (String) key; Object value = parameters.get(key); if (value.getClass().isArray()) { String[] values = (String[]) value; for (int i = 0; i < values.length; i++) { if (i > 0) { hiddenField.append("&"); } hiddenField.append(keyString).append("=").append(values[i]); total++; } } } } hiddenField.append("method=").append(request.getParameter("returnMethod")); return hiddenField.toString();
	private String getReturnUrl(HttpServletRequest request) {		StringBuffer buffer = new StringBuffer();		buffer.append(request.getRequestURI()).append("?").append(request.getQueryString());		return buffer.toString();	}