From 1621a39e35c8ef377d1383b2ff93eb8ad4dc5396 Mon Sep 17 00:00:00 2001 From: "rogan.dawes" Date: Thu, 10 Jan 2008 10:14:30 +0000 Subject: [PATCH] Provide an example of how to override the default setting using environment variables git-svn-id: http://webgoat.googlecode.com/svn/trunk@244 4033779f-a91e-0410-96ef-6bf7bf53c507 --- webgoat/main/webgoat for SQL Server.bat | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 webgoat/main/webgoat for SQL Server.bat diff --git a/ webgoat/main/webgoat for SQL Server.bat b/ webgoat/main/webgoat for SQL Server.bat new file mode 100644 index 000000000..d88d8dd35 --- /dev/null +++ b/ webgoat/main/webgoat for SQL Server.bat @@ -0,0 +1,34 @@ +@echo on + + +@REM Clear the lib env var as it can hose tomcat +SET lib= + +@REM Make sure the webgoat DB is writable +attrib -R .\tomcat\webapps\WebGoat\database\*.* + +@REM Set env vars for tomcat and java, use PWD as some machines don't have +@REM \. on their path +set PWD=%cd% +set CATALINA_HOME=%PWD%\tomcat +set JAVA_HOME=%PWD%\java + +@REM Configure environment variables to override web.xml +SET DatabaseDriver=net.sourceforge.jtds.jdbc.Driver +SET DatabaseConnectionString=jdbc:jtds:sqlserver://./webgoat;namedPipe=true;INSTANCE=WEBGOAT +SET DatabaseUser=webgoat +SET DtabasePassword=_webgoat + +delete .\tomcat\conf\server.xml +copy .\tomcat\conf\server_80.xml .\tomcat\conf\server.xml + +@REM Run tomcat: must have quotes incase var has spaces in it +call "%CATALINA_HOME%\bin\startup.bat" start + +echo +echo If the Tomcat DOS shell quit immediately, it is likely that +echo there is another service listening on port 80. +echo + + +