WebGoat教程学习(一)--环境配置

Github地址:

 https://github.com/WebGoat/WebGoat

部分课程运行需要修改源码,建议安装Developer版本

 

环境准备:

  • Java 1.8
  • Maven > 2.0.9
  • Your favorite IDE, with Maven awareness: Netbeans/IntelliJ/Eclipse with m2e installed.
  • Git, or Git support in your IDE
  • Tomcat7

开始安装:

1、创建项目目录并下载WebGoat和WebGoat-Lessons工程文件
mkdir WebGoat-Workspace
cd WebGoat-Workspace
2、编译WebGoat项目
cd WebGoat
git checkout develop
mvn clean compile install
cd ..
3、编译WebGoat-Lessons项目,并复制WebGoat-Lessons的jar包到WebGoat
cd WebGoat-Lessons
git checkout develop
mvn package
cp target/plugins/*.jar ../WebGoat/webgoat-container/src/main/webapp/plugin_lessons/
4、手动打包WebGoat并部署到tomcat
cd WebGoat
mvn package
cp webgoat-container/target/webgoat-container-7.1-SNAPSHOT.war <your_tomcat_directory>/webapps/
5、启动tomcat后,访问:http://localhost:8080/webgoat-container-7.1-SNAPSHOT(相对路径为war包的文件名)
 
注意:使用tomcat8、9时会报错,导致lesson menu加在不出来(使用Tomcat7,即可解决问题)
java.lang.ClassCastException: org.apache.catalina.loader.ParallelWebappClassLoader cannot be cast to org.apache.catalina.loader.WebappClassLoader
posted @ 2016-10-10 13:49  励志SQA女  阅读(4602)  评论(0编辑  收藏  举报