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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM