NIHVIVO-1207 improve log messages in Authenticate.

This commit is contained in:
jeb228 2010-11-04 14:42:58 +00:00
parent d22657b1c8
commit 8b2e38abca

View file

@ -401,13 +401,11 @@ public class Authenticate extends FreemarkerHttpServlet {
List<String> uris = userDao.getIndividualsUserMayEditAs(user List<String> uris = userDao.getIndividualsUserMayEditAs(user
.getURI()); .getURI());
if (uris != null && uris.size() > 0) { if (uris != null && uris.size() > 0) {
log.debug("User is logged in. Redirect as self-editor to "
+ sessionRedirect);
String userHomePage = request.getContextPath() String userHomePage = request.getContextPath()
+ "/individual?uri=" + "/individual?uri="
+ URLEncoder.encode(uris.get(0), "UTF-8"); + URLEncoder.encode(uris.get(0), "UTF-8");
log.debug("User is logged in. Redirect as self-editor to " log.debug("User is logged in. Redirect as self-editor to "
+ sessionRedirect); + userHomePage);
response.sendRedirect(userHomePage); response.sendRedirect(userHomePage);
return; return;
} }
@ -423,7 +421,7 @@ public class Authenticate extends FreemarkerHttpServlet {
* There has been an unexpected exception. Complain mightily. * There has been an unexpected exception. Complain mightily.
*/ */
private void showSystemError(Exception e, HttpServletResponse response) { private void showSystemError(Exception e, HttpServletResponse response) {
log.error("Unexpected error in login process" + e); log.error("Unexpected error in login process", e);
try { try {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} catch (IOException e1) { } catch (IOException e1) {