Introduced stanalone project which allows us to pass arguments to the Tomcat instance (eg port, address)

This commit is contained in:
Nanne Baars
2016-09-09 08:11:04 +02:00
parent 56bad8e087
commit b250af3564
7 changed files with 230 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
@ -243,7 +244,10 @@ public class HammerHead extends HttpServlet {
httpDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
propertiesPath = getServletContext().getRealPath("/WEB-INF/webgoat.properties");
webgoatContext = new WebgoatContext(this);
logger.info("Browse to http://localhost:8080/WebGoat and happy hacking!");
URL runningStandalone = Thread.currentThread().getContextClassLoader().getResource("standalone.properties");
if (runningStandalone == null) {
logger.info("Browse to http://localhost:8080/WebGoat and happy hacking!");
}
}
/**