private String buildSessionInitRedirectUrl(HttpServletRequest servletRequest) { return m_sessionLoginRedirect + "?returnUrl=" + ServletUtils.getRequestLocationIncludingQueryParameter(servletRequest); }
/** * Switches between getRequestLocationIncludingQueryParameter and * getRequestLocationIncludingParameter based on the * consumeFORMURLEncodedBody flag. */ public static String getRequestLocationIncludingParameter(final HttpServletRequest request, boolean consumeFORMURLEncodedBody) { if (!consumeFORMURLEncodedBody || "GET".equals(request.getMethod())) { return getRequestLocationIncludingQueryParameter(request); } if (mayContainRequestParameter(request)) { StringBuilder currentRequestLocation = new StringBuilder(getRequestLocation(request)); appendRequestParameter(currentRequestLocation, request); return currentRequestLocation.toString(); } return getRequestLocationIncludingQueryParameter(request); }