public String rewriteOutbound(String url, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException,
InvocationTargetException {
RewrittenOutboundUrl rou = processEncodeURL(response, request, false, url);
if (rou == null) {
return response.encodeURL(url);
}
if (rou.isEncode()) {
rou.setTarget(response.encodeURL(rou.getTarget()));
}
return processEncodeURL(response, request, true, rou.getTarget()).getTarget();
}