use of edu.uiuc.ncsa.security.delegation.storage.Client in project OA4MP by ncsa.
the class ErrorServlet method doIt.
@Override
protected void doIt(HttpServletRequest request, HttpServletResponse response) throws Throwable {
String cause = request.getParameter(CAUSE);
String identifier = request.getParameter(IDENTIFIER);
request.setAttribute(CAUSE, cause);
request.setAttribute(IDENTIFIER, identifier);
request.setAttribute(MESSAGE, URLDecoder.decode(request.getParameter(MESSAGE), "UTF-8"));
String stackTrace = request.getParameter(STACK_TRACE);
if (stackTrace == null || stackTrace.length() == 0) {
stackTrace = "(none)";
} else {
try {
stackTrace = new String(Base64.decodeBase64(stackTrace));
} catch (Throwable x) {
info("Could not decode stack trace for cause " + x.getClass().getName() + " msg=\"" + x.getMessage() + "\", trace:" + stackTrace);
stackTrace = "(none)";
}
}
request.setAttribute(STACK_TRACE, stackTrace);
if (cause.equals(UnknownClientException.class.getSimpleName())) {
JSPUtil.fwd(request, response, "/noClientErrorPage.jsp");
return;
}
Client client = getClient(BasicIdentifier.newID(identifier));
request.setAttribute("client", client);
JSPUtil.fwd(request, response, "/errorPage2.jsp");
}
Aggregations