jetty-9 fixed test webapp TestServer and improved error message

This commit is contained in:
Greg Wilkins 2012-11-29 16:11:02 +11:00
parent 9f5801c3fd
commit 9931ddec94
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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");