getLogger().log(Level.INFO, "Permanently redirecting client to: " + targetRef); response.redirectPermanent(targetRef); getLogger().log(Level.INFO, "Redirecting client to found location: " + targetRef); response.setLocationRef(targetRef); getLogger().log(Level.INFO, "Redirecting client to another location: " + targetRef); response.setLocationRef(targetRef); getLogger().log(Level.INFO, "Temporarily redirecting client to: " + targetRef); response.redirectTemporary(targetRef); getLogger().log(Level.INFO, "Redirecting via client connector to: " + targetRef); redirectDispatcher(targetRef, request, response);
/** * Returns the target reference to redirect to. * * @param request * The request to handle. * @param response * The response to update. * @return The target reference to redirect to. */ protected Reference getTargetRef(Request request, Response response) { // Create the template final Template rt = new Template(this.targetTemplate); rt.setLogger(getLogger()); // Return the formatted target URI return new Reference(rt.format(request, response)); }
rt.setLogger(getLogger()); final int matched = rt.parse(response.getLocationRef().toString(), request);