if (actionRequest.isSecure()) {
redirectURL.setSecure();
}
// Encode the redirect URL to a string.
location = actionResponse.encodeRedirectURL(redirectURL.toString());
}
// Here we intentionally use the original response
// instead of the wrapped internal response.
response.sendRedirect(location);