Fixed source code installation problem where default language didn't set correctly. Also updated the readme
git-svn-id: http://webgoat.googlecode.com/svn/trunk/webgoat@435 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
1a1e7125be
commit
be8b4311e0
30
README.txt
30
README.txt
@ -45,11 +45,12 @@ These tools must be installed independent of the webgoat download.
|
|||||||
You only need to download and install the "Java SE Development Kit (JDK)"
|
You only need to download and install the "Java SE Development Kit (JDK)"
|
||||||
- Maven > 2.0.9
|
- Maven > 2.0.9
|
||||||
Maven can be downloaded at: http://maven.apache.org/
|
Maven can be downloaded at: http://maven.apache.org/
|
||||||
At Ubuntu it can be installed with:
|
In Ubuntu it can be installed with:
|
||||||
> apt-get install maven2
|
> apt-get install maven2
|
||||||
- WebGoat source code
|
- WebGoat source code
|
||||||
WebGoat source code can be downloaded at: http://code.google.com/p/webgoat/source/checkout
|
WebGoat source code can be downloaded at: http://code.google.com/p/webgoat/source/checkout
|
||||||
Use any svn client (ex: Tortoise svn)to checkout the code.
|
Use an svn client (ex: Tortoise svn) to checkout the code.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
@ -79,6 +80,7 @@ File -> Import -> General -> Existing Projects into Workspace
|
|||||||
and select the webgoat directory as the "root directory." A webgoat should appear in the Projects section of your dialogue window.
|
and select the webgoat directory as the "root directory." A webgoat should appear in the Projects section of your dialogue window.
|
||||||
|
|
||||||
Don't forget to declare a classpath variable named M2_REPO, pointing to ~/.m2/repository, otherwise many links to existing jars will be broken.
|
Don't forget to declare a classpath variable named M2_REPO, pointing to ~/.m2/repository, otherwise many links to existing jars will be broken.
|
||||||
|
This folder is located in your username root folder, the same folder where "my documents" and "my pictures" are located.
|
||||||
You can declare new variables in Eclipse in Windows -> Preferences... and selecting Java -> Build Path -> Classpath Variables
|
You can declare new variables in Eclipse in Windows -> Preferences... and selecting Java -> Build Path -> Classpath Variables
|
||||||
|
|
||||||
|
|
||||||
@ -86,13 +88,10 @@ You can declare new variables in Eclipse in Windows -> Preferences... and select
|
|||||||
Option 1: Run the project on Tomcat within Eclipse
|
Option 1: Run the project on Tomcat within Eclipse
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
1. Install a local Tomcat server
|
Install a local Tomcat server
|
||||||
2. Open Eclipse -> File -> New -> Other -> Server -> Apache -> Tomcat -> Next
|
1. Download and unzip Apache Tomcat from http://tomcat.apache.org. Note that Tomcat 7.0 is currently not supported in WebGoat.
|
||||||
-> Insert your Tomcat Installation directory
|
2. Adapt the conf/tomcat-users.xml file of your Tomcat server:
|
||||||
-> Click next and add "webgoat" to the list of configured applications
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
-> Finish
|
|
||||||
3. Adapt the conf/tomcat-users.xml file of your Tomcat server:
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<tomcat-users>
|
<tomcat-users>
|
||||||
<role rolename="webgoat_basic"/>
|
<role rolename="webgoat_basic"/>
|
||||||
<role rolename="webgoat_admin"/>
|
<role rolename="webgoat_admin"/>
|
||||||
@ -103,9 +102,18 @@ Option 1: Run the project on Tomcat within Eclipse
|
|||||||
<user password="tomcat" roles="tomcat" username="tomcat"/>
|
<user password="tomcat" roles="tomcat" username="tomcat"/>
|
||||||
<user password="guest" roles="webgoat_user" username="guest"/>
|
<user password="guest" roles="webgoat_user" username="guest"/>
|
||||||
</tomcat-users>
|
</tomcat-users>
|
||||||
|
3. Open Eclipse -> File -> New -> Other -> Server -> Apache
|
||||||
|
4. Choose your Tomcat version
|
||||||
|
-> Click next "browse" to your tomcat install.
|
||||||
|
-> Make sure the "JRE" dropdown is pointing to your jdk. If it isn't listed, press
|
||||||
|
"Installed JREs" and add it.
|
||||||
|
-> Click next and add "webgoat" to the list of configured applications
|
||||||
|
-> Finish
|
||||||
|
|
||||||
4. Right Click on the webgoat project within eclipse -> Run As -> Run on server
|
|
||||||
5. http://localhost:8080/webgoat/attack
|
3. Right Click on the webgoat project within eclipse -> Run As -> Run on server
|
||||||
|
|
||||||
|
Point your browser to http://localhost:8080/webgoat/attack
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
@ -15,12 +15,12 @@ public class WebGoatI18N {
|
|||||||
public WebGoatI18N(WebgoatContext context){
|
public WebGoatI18N(WebgoatContext context){
|
||||||
Locale l = new Locale(context.getDefaultLanguage());
|
Locale l = new Locale(context.getDefaultLanguage());
|
||||||
WebGoatI18N.defaultLanguage=context.getDefaultLanguage();
|
WebGoatI18N.defaultLanguage=context.getDefaultLanguage();
|
||||||
labels.put(context.getDefaultLanguage(),ResourceBundle.getBundle("WebGoatLabels",l));
|
labels.put(context.getDefaultLanguage(),ResourceBundle.getBundle("WebGoatLabels_english",l));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadLanguage(String language){
|
public static void loadLanguage(String language){
|
||||||
Locale l = new Locale(language);
|
Locale l = new Locale(language);
|
||||||
labels.put(language, ResourceBundle.getBundle("WebGoatLabels",l));
|
labels.put(language, ResourceBundle.getBundle("WebGoatLabels_english",l));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setCurrentLanguage(String language){
|
public static void setCurrentLanguage(String language){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user