Make it possible to override WebGoat context settings via environment variables
git-svn-id: http://webgoat.googlecode.com/svn/trunk@242 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
c31ef90a3d
commit
71330946f4
@ -94,8 +94,12 @@ public class WebgoatContext {
|
||||
}
|
||||
|
||||
private String getParameter(HttpServlet servlet, String key) {
|
||||
return System.getProperty(key, servlet.getInitParameter(key));
|
||||
String value = System.getenv().get(key);
|
||||
if (value == null)
|
||||
value = servlet.getInitParameter(key);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the connection string with the real path to the database
|
||||
* directory inserted at the word PATH
|
||||
|
Loading…
x
Reference in New Issue
Block a user