jetty-9 fixed test webapp TestServer and improved error message
This commit is contained in:
parent
9f5801c3fd
commit
9931ddec94
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue