diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 5d4e3cc7e60..6ce69d268f5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -2073,11 +2073,11 @@ public class Request implements HttpServletRequest { _authentication=((Authentication.Deferred)_authentication).login(username,password,this); if (_authentication == null) - throw new ServletException(); + throw new ServletException("Authentication failed for "+username+" in "+_authentication); } else { - throw new ServletException("Authenticated as "+_authentication); + throw new ServletException("Already authenticated as "+_authentication); } } diff --git a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java index a46c344fc2b..9db3b74b53f 100644 --- a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java +++ b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java @@ -152,7 +152,7 @@ public class TestServer // Setup context HashLoginService login = new HashLoginService(); login.setName("Test Realm"); - login.setConfig(jetty_root + "/test-jetty-webapp/src/main/config/etc/realm.properties"); + login.setConfig(jetty_root + "/tests/test-webapps/test-jetty-webapp/src/main/config/etc/realm.properties"); server.addBean(login); File log=File.createTempFile("jetty-yyyy_mm_dd", "log");