resp.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR);
}
} else if ("html".equals(format)) {
// TODO : try to get a default XSLT template creating XHTML output, if found then use it
// and redirect if no template is available
RequestDispatcher dispatcher = req.getRequestDispatcher(DEFAULT_TOKEN_HTML_RESOURCE);
if (dispatcher == null) {
resp.setStatus(HttpURLConnection.HTTP_NOT_FOUND);
return;
}
try {
req.setAttribute("oauth_consumer_id", consumer.getKey());
req.setAttribute("oauth_consumer_display", consumer.getDisplayName());
req.setAttribute("oauth_consumer_scopes", requestToken.getScopes());
req.setAttribute("oauth_consumer_permissions", requestToken.getPermissions());
req.setAttribute("oauth_request_token", requestToken.getToken());
req.setAttribute("oauth_token_confirm_uri", getAuthorizationConfirmURI(req, null));
dispatcher.forward(req, resp);
} catch (Exception ex) {
resp.setStatus(500);
}
}
//else if ("json".equals(format)) {