} else {
String targetUri = request.getResourceRef().toString(true, false);
if (targetUri.contains("{")) {
// Template URI detected, create the template
Template template = new Template(getContext().getLogger(),
targetUri);
// Set the formatted target URI
request.setResourceRef(template.format(request, response));
}
// Actually dispatch the formatted URI
this.helper.handle(request, response);
}