if (redirect != null && !redirect.isEmpty()) {
IRequestHandler target = redirect.getRequestTarget();
final CharSequence url = RequestCycle.get().urlFor(target);
return new RedirectRequestHandler(url.toString());
} else {
return new RenderPageRequestHandler(new PageProvider(new ForbiddenPage(/*path*/)));
}
}