Allow WebGoat to create per-user databases

This creates the infrastructure to allow WebGoat to create per-user
databases, so that any modifications made by one user do not affect
other users. Some lessons may have made provision for this internally
(e.g. CrossSiteScripting lesson), but this simplifies things generally.

This also switches the default database from Access on windows, and
Enhydra on Unix/other platforms to using HSQLDB, in an "in-memory"
configuration. We may get performance problems from having too many
instances of the database in memory at once at sites that have 10's
of users banging on a central WebGoat. Only time will tell.


git-svn-id: http://webgoat.googlecode.com/svn/trunk@190 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
rogan.dawes
2007-07-18 13:34:14 +00:00
parent 9d19fa2433
commit d04371884b
25 changed files with 95 additions and 101 deletions

View File

@ -2,7 +2,6 @@ package org.owasp.webgoat;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
@ -212,12 +211,7 @@ public class HammerHead extends HttpServlet
log(request, "Could not write error screen: "
+ thr.getMessage());
}
try
{
WebSession.closeConnection();
} catch (SQLException sqle) {
sqle.printStackTrace();
}
WebSession.returnConnection(mySession);
// System.out.println( "HH Leaving doPost: " );
}
}