<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mseil</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mseil"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Mseil"/>
		<updated>2026-04-26T15:31:09Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet&amp;diff=232005</id>
		<title>Talk:XSS (Cross Site Scripting) Prevention Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet&amp;diff=232005"/>
				<updated>2017-08-03T20:02:04Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: Migrated a bug for ESAPI over to where it belongs.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This was somehow entered as a [[bug for ESAPI:https://github.com/ESAPI/esapi-java-legacy/issues/247|bug for ESAPI:]]&lt;br /&gt;
The cheat sheet currently gives three examples of CSS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;style&amp;gt;selector { property : ...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...; } &amp;lt;/style&amp;gt; property value&lt;br /&gt;
&amp;lt;style&amp;gt;selector { property : &amp;quot;...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...&amp;quot;; } &amp;lt;/style&amp;gt; property value&lt;br /&gt;
text&amp;lt;/style&amp;gt; property value&lt;br /&gt;
only 2 is safe against IE's expression syntax even when correctly encoded (see Issue 236).&lt;br /&gt;
&lt;br /&gt;
The text then goes on to say:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;All attributes should be quoted but your encoding should be strong enough to prevent XSS when untrusted data is placed in unquoted contexts.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
which is impossible since in an unquoted context, IE will still honour an encoded expression.&lt;br /&gt;
&lt;br /&gt;
There's a missing syntax:&lt;br /&gt;
&lt;br /&gt;
text&amp;lt;/style&amp;gt; property value&lt;br /&gt;
It's a dangerous omission since it's the only safe syntax for the style attribute.&lt;br /&gt;
&lt;br /&gt;
I think three things need to be done:&lt;br /&gt;
&lt;br /&gt;
Add syntax example 4&lt;br /&gt;
Mark 1 and 3 as &amp;quot;unsafe&amp;quot;&lt;br /&gt;
Modify the wording underneath to read &amp;quot;All attributes should be quoted or they will be vulnerable to XSS&amp;quot; or similarly acknowledge that encoding isn't enough in unquoted contexts.&lt;br /&gt;
&lt;br /&gt;
==============&lt;br /&gt;
Rule #5 has a few concerning points:&lt;br /&gt;
It mentions &amp;lt;a href=http://...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...&amp;gt;link&amp;lt;/a &amp;gt;, but I think more common is &amp;lt;a href=...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...&amp;gt;link&amp;lt;/a &amp;gt; where the full href contents are untrusted. There should be some mention here about relative links too.&lt;br /&gt;
&lt;br /&gt;
Is the following a contradiction?&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Except for alphanumeric characters, escape all characters with ASCII values less than 256 with the %HH escaping format.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Note that entity encoding is useless in this context.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The following is confusing and possibly nonsensical. &amp;quot;Including untrusted data in data: URLs should not be allowed as there is no good way to disable attacks with escaping to prevent switching out of the URL.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Other points about Rule #5:&lt;br /&gt;
&lt;br /&gt;
There are numerous special characters that must be accepted in URLs. The note that entity encoding is useless is not quite right. Entity encoding is useful to stop injecting UP. The problem with it, which should be explained in the article, is that when an anchor tag is clicked on, the entities are interpreted. This usually means that the link has to be clicked on to trigger the payload. However, if there is other javascript on the page which references this href value, it will use the un-encoded value. I've seen this in redirection javascript.&lt;br /&gt;
&lt;br /&gt;
Does forcing the untrusted data to start with http remediate this hole for absolute URLs? My assumption here is that the way to attack here would be to use &amp;quot;Javascript:some javascript&amp;quot; as the untrusted input.&lt;br /&gt;
&lt;br /&gt;
== DOM Based XSS ==&lt;br /&gt;
&lt;br /&gt;
Consider cross linking and adding information to ESAPI4JS for DOM-Based XSS Protection.&lt;br /&gt;
&lt;br /&gt;
For quick reference it has nearly the same API as ESAPI for Java EE&lt;br /&gt;
&lt;br /&gt;
$ESAPI.encoder().encodeForHTML()&lt;br /&gt;
$ESAPI.encoder().encodeForHTMLAttribute()&lt;br /&gt;
$ESAPI.encoder().encodeForJavaScript()&lt;br /&gt;
$ESAPI.encoder().encodeForCSS()&lt;br /&gt;
&lt;br /&gt;
This also is a direct port of the Java EE Encoders&lt;br /&gt;
== Examples ==&lt;br /&gt;
Agree with all above. In addition – article will greatly benefit from examples of evil input data examples. &lt;br /&gt;
For instance statement “Most web frameworks have a method for HTML escaping for the characters detailed below. However, this is absolutely not sufficient for other HTML contexts” would be even bolder if accompanied with example of alert statement executable in different contexts after it was HTML escaped.  &lt;br /&gt;
Like for code&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;% String url = ESAPI.encoder().encodeForHTML( request.getParameter( &amp;quot;input&amp;quot; ) ); %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;img src='$url'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following input : …&lt;br /&gt;
&lt;br /&gt;
Will produce executable&lt;br /&gt;
&lt;br /&gt;
“1.jpg' onerror='alert(document.cookie)”&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=212392</id>
		<title>ESAPI-BuildingWithEclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=212392"/>
				<updated>2016-04-04T03:50:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
* JDK 1.6 or later [http://www.oracle.com/technetwork/java/javase/downloads/index.html download here]. Note that you need the JDK and not just the JRE.&lt;br /&gt;
* To support the latest versions of Maven, first download Maven [https://maven.apache.org/download.cgi here]. (Note: Maven 3.0 or later is required.)&lt;br /&gt;
* Eclipse IDE for Java EE Developers 3.3.x or later [http://www.eclipse.org/downloads/ download here]. Install EGit and m2e plug-ins via &amp;quot;Help-&amp;gt;Install New Software...&amp;quot;.&lt;br /&gt;
** EGit Plug-in for Eclipse - Instructions on installing EGit plug-in can be found [https://eclipse.github.io/ here]&lt;br /&gt;
** M2E - Maven Integration for Eclipse - You can install the latest version from within Eclipse using the following [https://eclipse.org/m2e/ update site]&lt;br /&gt;
** Note that other git and Maven plug-in combinations for Eclipse are possible.&lt;br /&gt;
&lt;br /&gt;
==Spring Source ToolSuite==&lt;br /&gt;
STS is an eclipse distribution from the Spring foundation.  If you just care about getting up and running, and don't care about bloat, download here:  https://spring.io/tools/sts/all&lt;br /&gt;
&lt;br /&gt;
On Windows and linux distros, all you should have to do after extracting the main STS folder, is to navigate into the folder, and double-clicking the file &amp;quot;STS&amp;quot; or &amp;quot;STS.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It comes pre-packaged with a git plugin (so you can skip those instructions below) as well as its own versions of Ant and Maven.  You should be able to follow the &amp;quot;EGit&amp;quot; section to clone/import ESAPI in STS as soon as you have it running.  It still has a minimum dependency of java 1.6 jdk.  &lt;br /&gt;
&lt;br /&gt;
Detailed steps:&lt;br /&gt;
&lt;br /&gt;
1. Right click on the &amp;quot;Package Explorer&amp;quot; pane, and select &amp;quot;import.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2. Filter on &amp;quot;git&amp;quot; and select &amp;quot;Projects from git.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3. Select &amp;quot;Clone URI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Enter the URI:  https://github.com/ESAPI/esapi-java-legacy.git&lt;br /&gt;
&lt;br /&gt;
5. Click &amp;quot;Next.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
6. Click &amp;quot;Next&amp;quot; again.&lt;br /&gt;
&lt;br /&gt;
7. Select where you want to store the cloned repo, it defaults to %USERPROFILE%\git\esapi-java-legacy on windows.&lt;br /&gt;
&lt;br /&gt;
8. click &amp;quot;Next.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. On the import wizard, cancel.  &lt;br /&gt;
&lt;br /&gt;
10. Right-click again on the package explorer, and click import, filter on &amp;quot;Maven&amp;quot; and click on &amp;quot;Existing Maven Projects.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
11. Navigate to the folder you created in step 7.  Select &amp;quot;esapi-java-legacy&amp;quot; and click next.  &lt;br /&gt;
&lt;br /&gt;
12. Click finish.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You are ready to develop!&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
* For Winodws, create an Eclipse shortcut&lt;br /&gt;
* Right-Click your Eclipse shortcut and select Properties&lt;br /&gt;
* At the end of the line that says Target, add -vm &amp;quot;x&amp;quot; where x is the location of a JDK (e.g., &amp;quot;C:\Program Files\Java\jdk7\bin&amp;quot;) - This step is necessary for the Maven plugin to work. (If you installed Eclipse under Linux distro after you already had a JDK installed, this probably was already done for you.)&lt;br /&gt;
* Restart Eclipse using the edited shortcut.&lt;br /&gt;
&lt;br /&gt;
==Importing the ESAPI Source==&lt;br /&gt;
&lt;br /&gt;
If you choose to use the ESAPI GitHub code,Import Existing Eclipse projects.&amp;quot; follow the instructions at [[ESAPI-Building]].  Unless you have been added to the ESAPI project as a contributor, please use the submit fixes using [https://help.github.com/articles/using-pull-requests/ Git &amp;quot;pull requests&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
If you are using EGit, as recommended, open Eclipse and:&lt;br /&gt;
* Click ''File'' -&amp;gt; ''New'' -&amp;gt; ''Other....''.&lt;br /&gt;
* From the ''Git Folder'' select '&amp;quot;Checkout Projects from Git'' (this option will only be available if you have a Git plug-in installed) and hit ''Next &amp;gt;''.&lt;br /&gt;
* Click the ''Create a new repository location'' radio button.&lt;br /&gt;
* If you are not listed as a project contributor, insert ''https://github.com/ESAPI/esapi-java-legacy.git'' as the URL.  If you are listed as a project contributor, check the github page for the URL to use. &lt;br /&gt;
* Once the directory structure appears in the window, click the URL at the top to download everything.  Then hit ''Next &amp;gt;''&lt;br /&gt;
* Select your desired project options.  For most people, the default options should be fine. When finished, click ''Next &amp;gt;''.&lt;br /&gt;
* Select your desired workspace options, then click ''Finish''.  The latest ESAPI source files will then be downloaded to your workspace.  This may take a few minutes.&lt;br /&gt;
* After the source code is finished downloading, ensure that the character type of all source code is UTF-8. In Eclipse, right click on the project directory root. At the bottom of the right-click list, choose PROPERTIES. From the PROPERTIES window, select the RESOURCES section (which is selected by default). Ensure that the &amp;quot;Text file encoding&amp;quot; section is set to OTHER-&amp;gt;UTF 8. If if it is not, change it and click APPLY-&amp;gt;OK.&lt;br /&gt;
&lt;br /&gt;
==Project Setup==&lt;br /&gt;
&lt;br /&gt;
Some configuration may be necessary for ESAPI to compile and build on your system.&lt;br /&gt;
&lt;br /&gt;
ESAPI requires the Java JRE 6 or later.&lt;br /&gt;
&lt;br /&gt;
* Once Java 6.0+ is installed, open the ''Navigator view'' in Eclipse.  If this is currently hidden, from the toolbar click ''Window'' -&amp;gt; ''Show View'' -&amp;gt; ''Navigator''.&lt;br /&gt;
* Right-click on your ESAPI project in the Navigator, mouse over ''Maven'' and click ''Enable Dependency Management''&lt;br /&gt;
** ''Note:'' If Maven is not an option when you right-click on the project, be sure the Maven plugin for eclipse is installed, as described above.&lt;br /&gt;
** ''Note:'' If ''Enable Dependency Management'' is not an option, dependency management is probably already enabled, So this step can be skipped.&lt;br /&gt;
* ''Right-click on the ESAPI project root folder'' in the Navigator view and select ''Properties''.&lt;br /&gt;
* From the left column, select ''Java Build Path''.  Under the ''Libraries'' tab, be sure a JRE or JDK is listed next to ''JRE System Library''.  If there is a red X on next to the JRE, remove the current JRE and click ''Add Library'' and select an alternate JRE.  If you are having trouble figuring out what version the current JRE is, select ''Installed JREs'' and look at the location to which each version is mapped.&lt;br /&gt;
* The Libraries tab should list ''JRE System Library'' and ''Maven Dependencies''.  If anything else is listed, it is not necessary and should be removed.  Maven now handles all dependencies.&lt;br /&gt;
* From the left column, select ''Java Compiler''.  Be sure ''Compiler compliance level'', ''Generated .class files compatibility'', and ''Source compatibility'' are all set to ''1.6''. (Note: Most of us use JDK 7 or JDK 8 to build ESAPI, but we use '-source 1.6 -target 1.6' when we compile to still support really old web applications still using JDK 1.6.) &lt;br /&gt;
* Close the properties window.&lt;br /&gt;
* ''Right-click the ESAPI project root folder'' and select ''Refresh''.&lt;br /&gt;
* From the toolbar, select ''Project'' -&amp;gt; ''Clean..'' and select the ESAPI project.  Click ''OK''.&lt;br /&gt;
* If errors remain, select ''Maven'' again, then ''Update Dependencies''.&lt;br /&gt;
* ESAPI should now be compiled.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
Building ESAPI should be easy with the new Maven integration.&lt;br /&gt;
&lt;br /&gt;
Once your environment is set up, as specified above:&lt;br /&gt;
* Right-Click your ESAPI project root folder&lt;br /&gt;
* Select ''Run As...''&lt;br /&gt;
* Select ''Run Configurations''&lt;br /&gt;
* Double Click &amp;quot;Maven Build&amp;quot; from the options on the left to create a new configuration.&lt;br /&gt;
* Name your configuration at the top.  This will be for building ESAPI without running JUnit tests.&lt;br /&gt;
* The &amp;quot;Base directory&amp;quot; should point to the root of your project&lt;br /&gt;
* The &amp;quot;Goals&amp;quot; field type &amp;quot;package&amp;quot;&lt;br /&gt;
* Any options not mentioned should be left as their default&lt;br /&gt;
* Click &amp;quot;Apply&amp;quot; to save your build configuration&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to run your configuration&lt;br /&gt;
&lt;br /&gt;
''NOTE: Jars created through building are located in the directory called &amp;quot;target&amp;quot;. ''&lt;br /&gt;
&lt;br /&gt;
==Running Demo App==&lt;br /&gt;
&lt;br /&gt;
The ESAPI Demo application has been named ''The ESAPI Swingset''.  More information about Swingset is available [http://www.owasp.org/index.php/ESAPI_Swingset here].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Enterprise Security API]]&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=212391</id>
		<title>ESAPI-BuildingWithEclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=212391"/>
				<updated>2016-04-04T03:50:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
* JDK 1.6 or later [http://www.oracle.com/technetwork/java/javase/downloads/index.html download here]. Note that you need the JDK and not just the JRE.&lt;br /&gt;
* To support the latest versions of Maven, first download Maven [https://maven.apache.org/download.cgi here]. (Note: Maven 3.0 or later is required.)&lt;br /&gt;
* Eclipse IDE for Java EE Developers 3.3.x or later [http://www.eclipse.org/downloads/ download here]. Install EGit and m2e plug-ins via &amp;quot;Help-&amp;gt;Install New Software...&amp;quot;.&lt;br /&gt;
** EGit Plug-in for Eclipse - Instructions on installing EGit plug-in can be found [https://eclipse.github.io/ here]&lt;br /&gt;
** M2E - Maven Integration for Eclipse - You can install the latest version from within Eclipse using the following [https://eclipse.org/m2e/ update site]&lt;br /&gt;
** Note that other git and Maven plug-in combinations for Eclipse are possible.&lt;br /&gt;
&lt;br /&gt;
==Spring Source ToolSuite==&lt;br /&gt;
STS is an eclipse distribution from the Spring foundation.  If you just care about getting up and running, and don't care about bloat, download here:  https://spring.io/tools/sts/all&lt;br /&gt;
&lt;br /&gt;
On Windows and linux distros, all you should have to do after extracting the main STS folder, is to navigate into the folder, and double-clicking the file &amp;quot;STS&amp;quot; or &amp;quot;STS.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It comes pre-packaged with a git plugin (so you can skip those instructions below) as well as its own versions of Ant and Maven.  You should be able to follow the &amp;quot;EGit&amp;quot; section to clone/import ESAPI in STS as soon as you have it running.  It still has a minimum dependency of java 1.6 jdk.  &lt;br /&gt;
&lt;br /&gt;
Detailed steps:&lt;br /&gt;
&lt;br /&gt;
1. Right click on the &amp;quot;Package Explorer&amp;quot; pane, and select &amp;quot;import.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2. Filter on &amp;quot;git&amp;quot; and select &amp;quot;Projects from git.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3. Select &amp;quot;Clone URI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Enter the URI:  https://github.com/ESAPI/esapi-java-legacy.git&lt;br /&gt;
5. Click &amp;quot;Next.&amp;quot;&lt;br /&gt;
6. Click &amp;quot;Next&amp;quot; again.&lt;br /&gt;
7. Select where you want to store the cloned repo, it defaults to %USERPROFILE%\git\esapi-java-legacy on windows.&lt;br /&gt;
8. click &amp;quot;Next.&amp;quot;&lt;br /&gt;
9. On the import wizard, cancel.  &lt;br /&gt;
10. Right-click again on the package explorer, and click import, filter on &amp;quot;Maven&amp;quot; and click on &amp;quot;Existing Maven Projects.&amp;quot;&lt;br /&gt;
11. Navigate to the folder you created in step 7.  Select &amp;quot;esapi-java-legacy&amp;quot; and click next.  &lt;br /&gt;
12. Click finish.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You are ready to develop!&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
* For Winodws, create an Eclipse shortcut&lt;br /&gt;
* Right-Click your Eclipse shortcut and select Properties&lt;br /&gt;
* At the end of the line that says Target, add -vm &amp;quot;x&amp;quot; where x is the location of a JDK (e.g., &amp;quot;C:\Program Files\Java\jdk7\bin&amp;quot;) - This step is necessary for the Maven plugin to work. (If you installed Eclipse under Linux distro after you already had a JDK installed, this probably was already done for you.)&lt;br /&gt;
* Restart Eclipse using the edited shortcut.&lt;br /&gt;
&lt;br /&gt;
==Importing the ESAPI Source==&lt;br /&gt;
&lt;br /&gt;
If you choose to use the ESAPI GitHub code,Import Existing Eclipse projects.&amp;quot; follow the instructions at [[ESAPI-Building]].  Unless you have been added to the ESAPI project as a contributor, please use the submit fixes using [https://help.github.com/articles/using-pull-requests/ Git &amp;quot;pull requests&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
If you are using EGit, as recommended, open Eclipse and:&lt;br /&gt;
* Click ''File'' -&amp;gt; ''New'' -&amp;gt; ''Other....''.&lt;br /&gt;
* From the ''Git Folder'' select '&amp;quot;Checkout Projects from Git'' (this option will only be available if you have a Git plug-in installed) and hit ''Next &amp;gt;''.&lt;br /&gt;
* Click the ''Create a new repository location'' radio button.&lt;br /&gt;
* If you are not listed as a project contributor, insert ''https://github.com/ESAPI/esapi-java-legacy.git'' as the URL.  If you are listed as a project contributor, check the github page for the URL to use. &lt;br /&gt;
* Once the directory structure appears in the window, click the URL at the top to download everything.  Then hit ''Next &amp;gt;''&lt;br /&gt;
* Select your desired project options.  For most people, the default options should be fine. When finished, click ''Next &amp;gt;''.&lt;br /&gt;
* Select your desired workspace options, then click ''Finish''.  The latest ESAPI source files will then be downloaded to your workspace.  This may take a few minutes.&lt;br /&gt;
* After the source code is finished downloading, ensure that the character type of all source code is UTF-8. In Eclipse, right click on the project directory root. At the bottom of the right-click list, choose PROPERTIES. From the PROPERTIES window, select the RESOURCES section (which is selected by default). Ensure that the &amp;quot;Text file encoding&amp;quot; section is set to OTHER-&amp;gt;UTF 8. If if it is not, change it and click APPLY-&amp;gt;OK.&lt;br /&gt;
&lt;br /&gt;
==Project Setup==&lt;br /&gt;
&lt;br /&gt;
Some configuration may be necessary for ESAPI to compile and build on your system.&lt;br /&gt;
&lt;br /&gt;
ESAPI requires the Java JRE 6 or later.&lt;br /&gt;
&lt;br /&gt;
* Once Java 6.0+ is installed, open the ''Navigator view'' in Eclipse.  If this is currently hidden, from the toolbar click ''Window'' -&amp;gt; ''Show View'' -&amp;gt; ''Navigator''.&lt;br /&gt;
* Right-click on your ESAPI project in the Navigator, mouse over ''Maven'' and click ''Enable Dependency Management''&lt;br /&gt;
** ''Note:'' If Maven is not an option when you right-click on the project, be sure the Maven plugin for eclipse is installed, as described above.&lt;br /&gt;
** ''Note:'' If ''Enable Dependency Management'' is not an option, dependency management is probably already enabled, So this step can be skipped.&lt;br /&gt;
* ''Right-click on the ESAPI project root folder'' in the Navigator view and select ''Properties''.&lt;br /&gt;
* From the left column, select ''Java Build Path''.  Under the ''Libraries'' tab, be sure a JRE or JDK is listed next to ''JRE System Library''.  If there is a red X on next to the JRE, remove the current JRE and click ''Add Library'' and select an alternate JRE.  If you are having trouble figuring out what version the current JRE is, select ''Installed JREs'' and look at the location to which each version is mapped.&lt;br /&gt;
* The Libraries tab should list ''JRE System Library'' and ''Maven Dependencies''.  If anything else is listed, it is not necessary and should be removed.  Maven now handles all dependencies.&lt;br /&gt;
* From the left column, select ''Java Compiler''.  Be sure ''Compiler compliance level'', ''Generated .class files compatibility'', and ''Source compatibility'' are all set to ''1.6''. (Note: Most of us use JDK 7 or JDK 8 to build ESAPI, but we use '-source 1.6 -target 1.6' when we compile to still support really old web applications still using JDK 1.6.) &lt;br /&gt;
* Close the properties window.&lt;br /&gt;
* ''Right-click the ESAPI project root folder'' and select ''Refresh''.&lt;br /&gt;
* From the toolbar, select ''Project'' -&amp;gt; ''Clean..'' and select the ESAPI project.  Click ''OK''.&lt;br /&gt;
* If errors remain, select ''Maven'' again, then ''Update Dependencies''.&lt;br /&gt;
* ESAPI should now be compiled.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
Building ESAPI should be easy with the new Maven integration.&lt;br /&gt;
&lt;br /&gt;
Once your environment is set up, as specified above:&lt;br /&gt;
* Right-Click your ESAPI project root folder&lt;br /&gt;
* Select ''Run As...''&lt;br /&gt;
* Select ''Run Configurations''&lt;br /&gt;
* Double Click &amp;quot;Maven Build&amp;quot; from the options on the left to create a new configuration.&lt;br /&gt;
* Name your configuration at the top.  This will be for building ESAPI without running JUnit tests.&lt;br /&gt;
* The &amp;quot;Base directory&amp;quot; should point to the root of your project&lt;br /&gt;
* The &amp;quot;Goals&amp;quot; field type &amp;quot;package&amp;quot;&lt;br /&gt;
* Any options not mentioned should be left as their default&lt;br /&gt;
* Click &amp;quot;Apply&amp;quot; to save your build configuration&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to run your configuration&lt;br /&gt;
&lt;br /&gt;
''NOTE: Jars created through building are located in the directory called &amp;quot;target&amp;quot;. ''&lt;br /&gt;
&lt;br /&gt;
==Running Demo App==&lt;br /&gt;
&lt;br /&gt;
The ESAPI Demo application has been named ''The ESAPI Swingset''.  More information about Swingset is available [http://www.owasp.org/index.php/ESAPI_Swingset here].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Enterprise Security API]]&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=212390</id>
		<title>ESAPI-BuildingWithEclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=212390"/>
				<updated>2016-04-04T03:46:57Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
* JDK 1.6 or later [http://www.oracle.com/technetwork/java/javase/downloads/index.html download here]. Note that you need the JDK and not just the JRE.&lt;br /&gt;
* To support the latest versions of Maven, first download Maven [https://maven.apache.org/download.cgi here]. (Note: Maven 3.0 or later is required.)&lt;br /&gt;
* Eclipse IDE for Java EE Developers 3.3.x or later [http://www.eclipse.org/downloads/ download here]. Install EGit and m2e plug-ins via &amp;quot;Help-&amp;gt;Install New Software...&amp;quot;.&lt;br /&gt;
** EGit Plug-in for Eclipse - Instructions on installing EGit plug-in can be found [https://eclipse.github.io/ here]&lt;br /&gt;
** M2E - Maven Integration for Eclipse - You can install the latest version from within Eclipse using the following [https://eclipse.org/m2e/ update site]&lt;br /&gt;
** Note that other git and Maven plug-in combinations for Eclipse are possible.&lt;br /&gt;
&lt;br /&gt;
==Spring Source ToolSuite==&lt;br /&gt;
STS is an eclipse distribution from the Spring foundation.  If you just care about getting up and running, and don't care about bloat, download here:  https://spring.io/tools/sts/all&lt;br /&gt;
&lt;br /&gt;
On Windows and linux distros, all you should have to do after extracting the main STS folder, is to navigate into the folder, and double-clicking the file &amp;quot;STS&amp;quot; or &amp;quot;STS.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It comes pre-packaged with a git plugin (so you can skip those instructions below) as well as its own versions of Ant and Maven.  You should be able to follow the &amp;quot;EGit&amp;quot; section to clone/import ESAPI in STS as soon as you have it running.  It still has a minimum dependency of java 1.6 jdk.  &lt;br /&gt;
&lt;br /&gt;
Detailed steps:&lt;br /&gt;
&lt;br /&gt;
1. Right click on the &amp;quot;Package Explorer&amp;quot; pane, and select &amp;quot;import.&amp;quot;&lt;br /&gt;
2. Filter on &amp;quot;git&amp;quot; and select &amp;quot;Projects from git.&amp;quot;&lt;br /&gt;
3. Select &amp;quot;Clone URI&amp;quot;&lt;br /&gt;
4. Enter the URI:  https://github.com/ESAPI/esapi-java-legacy.git&lt;br /&gt;
5. Click &amp;quot;Next.&amp;quot;&lt;br /&gt;
6. Click &amp;quot;Next&amp;quot; again.&lt;br /&gt;
7. Select where you want to store the cloned repo, it defaults to %USERPROFILE%\git\esapi-java-legacy on windows.&lt;br /&gt;
8. click &amp;quot;Next.&amp;quot;&lt;br /&gt;
9. On the import wizard, cancel.  &lt;br /&gt;
10. Right-click again on the package explorer, and click import, filter on &amp;quot;Maven&amp;quot; and click on &amp;quot;Existing Maven Projects.&amp;quot;&lt;br /&gt;
11. Navigate to the folder you created in step 7.  Select &amp;quot;esapi-java-legacy&amp;quot; and click next.  &lt;br /&gt;
12. Click finish.&lt;br /&gt;
&lt;br /&gt;
Congratulations!  You are ready to develop!&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
* For Winodws, create an Eclipse shortcut&lt;br /&gt;
* Right-Click your Eclipse shortcut and select Properties&lt;br /&gt;
* At the end of the line that says Target, add -vm &amp;quot;x&amp;quot; where x is the location of a JDK (e.g., &amp;quot;C:\Program Files\Java\jdk7\bin&amp;quot;) - This step is necessary for the Maven plugin to work. (If you installed Eclipse under Linux distro after you already had a JDK installed, this probably was already done for you.)&lt;br /&gt;
* Restart Eclipse using the edited shortcut.&lt;br /&gt;
&lt;br /&gt;
==Importing the ESAPI Source==&lt;br /&gt;
&lt;br /&gt;
If you choose to use the ESAPI GitHub code,Import Existing Eclipse projects.&amp;quot; follow the instructions at [[ESAPI-Building]].  Unless you have been added to the ESAPI project as a contributor, please use the submit fixes using [https://help.github.com/articles/using-pull-requests/ Git &amp;quot;pull requests&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
If you are using EGit, as recommended, open Eclipse and:&lt;br /&gt;
* Click ''File'' -&amp;gt; ''New'' -&amp;gt; ''Other....''.&lt;br /&gt;
* From the ''Git Folder'' select '&amp;quot;Checkout Projects from Git'' (this option will only be available if you have a Git plug-in installed) and hit ''Next &amp;gt;''.&lt;br /&gt;
* Click the ''Create a new repository location'' radio button.&lt;br /&gt;
* If you are not listed as a project contributor, insert ''https://github.com/ESAPI/esapi-java-legacy.git'' as the URL.  If you are listed as a project contributor, check the github page for the URL to use. &lt;br /&gt;
* Once the directory structure appears in the window, click the URL at the top to download everything.  Then hit ''Next &amp;gt;''&lt;br /&gt;
* Select your desired project options.  For most people, the default options should be fine. When finished, click ''Next &amp;gt;''.&lt;br /&gt;
* Select your desired workspace options, then click ''Finish''.  The latest ESAPI source files will then be downloaded to your workspace.  This may take a few minutes.&lt;br /&gt;
* After the source code is finished downloading, ensure that the character type of all source code is UTF-8. In Eclipse, right click on the project directory root. At the bottom of the right-click list, choose PROPERTIES. From the PROPERTIES window, select the RESOURCES section (which is selected by default). Ensure that the &amp;quot;Text file encoding&amp;quot; section is set to OTHER-&amp;gt;UTF 8. If if it is not, change it and click APPLY-&amp;gt;OK.&lt;br /&gt;
&lt;br /&gt;
==Project Setup==&lt;br /&gt;
&lt;br /&gt;
Some configuration may be necessary for ESAPI to compile and build on your system.&lt;br /&gt;
&lt;br /&gt;
ESAPI requires the Java JRE 6 or later.&lt;br /&gt;
&lt;br /&gt;
* Once Java 6.0+ is installed, open the ''Navigator view'' in Eclipse.  If this is currently hidden, from the toolbar click ''Window'' -&amp;gt; ''Show View'' -&amp;gt; ''Navigator''.&lt;br /&gt;
* Right-click on your ESAPI project in the Navigator, mouse over ''Maven'' and click ''Enable Dependency Management''&lt;br /&gt;
** ''Note:'' If Maven is not an option when you right-click on the project, be sure the Maven plugin for eclipse is installed, as described above.&lt;br /&gt;
** ''Note:'' If ''Enable Dependency Management'' is not an option, dependency management is probably already enabled, So this step can be skipped.&lt;br /&gt;
* ''Right-click on the ESAPI project root folder'' in the Navigator view and select ''Properties''.&lt;br /&gt;
* From the left column, select ''Java Build Path''.  Under the ''Libraries'' tab, be sure a JRE or JDK is listed next to ''JRE System Library''.  If there is a red X on next to the JRE, remove the current JRE and click ''Add Library'' and select an alternate JRE.  If you are having trouble figuring out what version the current JRE is, select ''Installed JREs'' and look at the location to which each version is mapped.&lt;br /&gt;
* The Libraries tab should list ''JRE System Library'' and ''Maven Dependencies''.  If anything else is listed, it is not necessary and should be removed.  Maven now handles all dependencies.&lt;br /&gt;
* From the left column, select ''Java Compiler''.  Be sure ''Compiler compliance level'', ''Generated .class files compatibility'', and ''Source compatibility'' are all set to ''1.6''. (Note: Most of us use JDK 7 or JDK 8 to build ESAPI, but we use '-source 1.6 -target 1.6' when we compile to still support really old web applications still using JDK 1.6.) &lt;br /&gt;
* Close the properties window.&lt;br /&gt;
* ''Right-click the ESAPI project root folder'' and select ''Refresh''.&lt;br /&gt;
* From the toolbar, select ''Project'' -&amp;gt; ''Clean..'' and select the ESAPI project.  Click ''OK''.&lt;br /&gt;
* If errors remain, select ''Maven'' again, then ''Update Dependencies''.&lt;br /&gt;
* ESAPI should now be compiled.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
Building ESAPI should be easy with the new Maven integration.&lt;br /&gt;
&lt;br /&gt;
Once your environment is set up, as specified above:&lt;br /&gt;
* Right-Click your ESAPI project root folder&lt;br /&gt;
* Select ''Run As...''&lt;br /&gt;
* Select ''Run Configurations''&lt;br /&gt;
* Double Click &amp;quot;Maven Build&amp;quot; from the options on the left to create a new configuration.&lt;br /&gt;
* Name your configuration at the top.  This will be for building ESAPI without running JUnit tests.&lt;br /&gt;
* The &amp;quot;Base directory&amp;quot; should point to the root of your project&lt;br /&gt;
* The &amp;quot;Goals&amp;quot; field type &amp;quot;package&amp;quot;&lt;br /&gt;
* Any options not mentioned should be left as their default&lt;br /&gt;
* Click &amp;quot;Apply&amp;quot; to save your build configuration&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to run your configuration&lt;br /&gt;
&lt;br /&gt;
''NOTE: Jars created through building are located in the directory called &amp;quot;target&amp;quot;. ''&lt;br /&gt;
&lt;br /&gt;
==Running Demo App==&lt;br /&gt;
&lt;br /&gt;
The ESAPI Demo application has been named ''The ESAPI Swingset''.  More information about Swingset is available [http://www.owasp.org/index.php/ESAPI_Swingset here].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Enterprise Security API]]&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=211947</id>
		<title>ESAPI-BuildingWithEclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=211947"/>
				<updated>2016-03-28T16:27:40Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
* JDK 1.6 or later [http://www.oracle.com/technetwork/java/javase/downloads/index.html download here]. Note that you need the JDK and not just the JRE.&lt;br /&gt;
* To support the latest versions of Maven, first download Maven [https://maven.apache.org/download.cgi here]. (Note: Maven 3.0 or later is required.)&lt;br /&gt;
* Eclipse IDE for Java EE Developers 3.3.x or later [http://www.eclipse.org/downloads/ download here]. Install EGit and m2e plug-ins via &amp;quot;Help-&amp;gt;Install New Software...&amp;quot;.&lt;br /&gt;
** EGit Plug-in for Eclipse - Instructions on installing EGit plug-in can be found [https://eclipse.github.io/ here]&lt;br /&gt;
** M2E - Maven Integration for Eclipse - You can install the latest version from within Eclipse using the following [https://eclipse.org/m2e/ update site]&lt;br /&gt;
** Note that other git and Maven plug-in combinations for Eclipse are possible.&lt;br /&gt;
&lt;br /&gt;
==Spring Source ToolSuite==&lt;br /&gt;
STS is an eclipse distribution from the Spring foundation.  If you just care about getting up and running, and don't care about bloat, download here:  https://spring.io/tools/sts/all&lt;br /&gt;
&lt;br /&gt;
On Windows and linux distros, all you should have to do after extracting the main STS folder, is to navigate into the folder, and double-clicking the file &amp;quot;STS&amp;quot; or &amp;quot;STS.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It comes pre-packaged with a git plugin (so you can skip those instructions below) as well as its own versions of Ant and Maven.  You should be able to follow the &amp;quot;EGit&amp;quot; section to clone/import ESAPI in STS as soon as you have it running.  It still has a minimum dependency of java 1.6 jdk.  &lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
* For Winodws, create an Eclipse shortcut&lt;br /&gt;
* Right-Click your Eclipse shortcut and select Properties&lt;br /&gt;
* At the end of the line that says Target, add -vm &amp;quot;x&amp;quot; where x is the location of a JDK (e.g., &amp;quot;C:\Program Files\Java\jdk7\bin&amp;quot;) - This step is necessary for the Maven plugin to work. (If you installed Eclipse under Linux distro after you already had a JDK installed, this probably was already done for you.)&lt;br /&gt;
* Restart Eclipse using the edited shortcut.&lt;br /&gt;
&lt;br /&gt;
==Importing the ESAPI Source==&lt;br /&gt;
&lt;br /&gt;
If you choose to use the ESAPI GitHub code, follow the instructions at [[ESAPI-Building]].  Unless you have been added to the ESAPI project as a contributor, please use the submit fixes using [https://help.github.com/articles/using-pull-requests/ Git &amp;quot;pull requests&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
If you are using EGit, as recommended, open Eclipse and:&lt;br /&gt;
* Click ''File'' -&amp;gt; ''New'' -&amp;gt; ''Other....''.&lt;br /&gt;
* From the ''Git Folder'' select '&amp;quot;Checkout Projects from Git'' (this option will only be available if you have a Git plug-in installed) and hit ''Next &amp;gt;''.&lt;br /&gt;
* Click the ''Create a new repository location'' radio button.&lt;br /&gt;
* If you are not listed as a project contributor, insert ''https://github.com/ESAPI/esapi-java-legacy.git'' as the URL.  If you are listed as a project contributor, check the github page for the URL to use. &lt;br /&gt;
* Once the directory structure appears in the window, click the URL at the top to download everything.  Then hit ''Next &amp;gt;''&lt;br /&gt;
* Select your desired project options.  For most people, the default options should be fine. When finished, click ''Next &amp;gt;''.&lt;br /&gt;
* Select your desired workspace options, then click ''Finish''.  The latest ESAPI source files will then be downloaded to your workspace.  This may take a few minutes.&lt;br /&gt;
* After the source code is finished downloading, ensure that the character type of all source code is UTF-8. In Eclipse, right click on the project directory root. At the bottom of the right-click list, choose PROPERTIES. From the PROPERTIES window, select the RESOURCES section (which is selected by default). Ensure that the &amp;quot;Text file encoding&amp;quot; section is set to OTHER-&amp;gt;UTF 8. If if it is not, change it and click APPLY-&amp;gt;OK.&lt;br /&gt;
&lt;br /&gt;
==Project Setup==&lt;br /&gt;
&lt;br /&gt;
Some configuration may be necessary for ESAPI to compile and build on your system.&lt;br /&gt;
&lt;br /&gt;
ESAPI requires the Java JRE 6 or later.&lt;br /&gt;
&lt;br /&gt;
* Once Java 6.0+ is installed, open the ''Navigator view'' in Eclipse.  If this is currently hidden, from the toolbar click ''Window'' -&amp;gt; ''Show View'' -&amp;gt; ''Navigator''.&lt;br /&gt;
* Right-click on your ESAPI project in the Navigator, mouse over ''Maven'' and click ''Enable Dependency Management''&lt;br /&gt;
** ''Note:'' If Maven is not an option when you right-click on the project, be sure the Maven plugin for eclipse is installed, as described above.&lt;br /&gt;
** ''Note:'' If ''Enable Dependency Management'' is not an option, dependency management is probably already enabled, So this step can be skipped.&lt;br /&gt;
* ''Right-click on the ESAPI project root folder'' in the Navigator view and select ''Properties''.&lt;br /&gt;
* From the left column, select ''Java Build Path''.  Under the ''Libraries'' tab, be sure a JRE or JDK is listed next to ''JRE System Library''.  If there is a red X on next to the JRE, remove the current JRE and click ''Add Library'' and select an alternate JRE.  If you are having trouble figuring out what version the current JRE is, select ''Installed JREs'' and look at the location to which each version is mapped.&lt;br /&gt;
* The Libraries tab should list ''JRE System Library'' and ''Maven Dependencies''.  If anything else is listed, it is not necessary and should be removed.  Maven now handles all dependencies.&lt;br /&gt;
* From the left column, select ''Java Compiler''.  Be sure ''Compiler compliance level'', ''Generated .class files compatibility'', and ''Source compatibility'' are all set to ''1.6''. (Note: Most of us use JDK 7 or JDK 8 to build ESAPI, but we use '-source 1.6 -target 1.6' when we compile to still support really old web applications still using JDK 1.6.) &lt;br /&gt;
* Close the properties window.&lt;br /&gt;
* ''Right-click the ESAPI project root folder'' and select ''Refresh''.&lt;br /&gt;
* From the toolbar, select ''Project'' -&amp;gt; ''Clean..'' and select the ESAPI project.  Click ''OK''.&lt;br /&gt;
* If errors remain, select ''Maven'' again, then ''Update Dependencies''.&lt;br /&gt;
* ESAPI should now be compiled.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
Building ESAPI should be easy with the new Maven integration.&lt;br /&gt;
&lt;br /&gt;
Once your environment is set up, as specified above:&lt;br /&gt;
* Right-Click your ESAPI project root folder&lt;br /&gt;
* Select ''Run As...''&lt;br /&gt;
* Select ''Run Configurations''&lt;br /&gt;
* Double Click &amp;quot;Maven Build&amp;quot; from the options on the left to create a new configuration.&lt;br /&gt;
* Name your configuration at the top.  This will be for building ESAPI without running JUnit tests.&lt;br /&gt;
* The &amp;quot;Base directory&amp;quot; should point to the root of your project&lt;br /&gt;
* The &amp;quot;Goals&amp;quot; field type &amp;quot;package&amp;quot;&lt;br /&gt;
* Any options not mentioned should be left as their default&lt;br /&gt;
* Click &amp;quot;Apply&amp;quot; to save your build configuration&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to run your configuration&lt;br /&gt;
&lt;br /&gt;
''NOTE: Jars created through building are located in the directory called &amp;quot;target&amp;quot;. ''&lt;br /&gt;
&lt;br /&gt;
==Running Demo App==&lt;br /&gt;
&lt;br /&gt;
The ESAPI Demo application has been named ''The ESAPI Swingset''.  More information about Swingset is available [http://www.owasp.org/index.php/ESAPI_Swingset here].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Enterprise Security API]]&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=211871</id>
		<title>ESAPI-BuildingWithEclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=211871"/>
				<updated>2016-03-27T21:21:51Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
* JDK 1.6 or later [http://www.oracle.com/technetwork/java/javase/downloads/index.html download here]. Note that you need the JDK and not just the JRE.&lt;br /&gt;
* To support the latest versions of Maven, first download Maven [https://maven.apache.org/download.cgi here]. (Note: Maven 3.0 or later is required.)&lt;br /&gt;
* Eclipse IDE for Java EE Developers 3.3.x or later [http://www.eclipse.org/downloads/ download here]. Install EGit and m2e plug-ins via &amp;quot;Help-&amp;gt;Install New Software...&amp;quot;.&lt;br /&gt;
** EGit Plug-in for Eclipse - Instructions on installing EGit plug-in can be found [https://eclipse.github.io/ here]&lt;br /&gt;
** M2E - Maven Integration for Eclipse - You can install the latest version from within Eclipse using the following [https://eclipse.org/m2e/ update site]&lt;br /&gt;
** Note that other git and Maven plug-in combinations for Eclipse are possible.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
* For Winodws, create an Eclipse shortcut&lt;br /&gt;
* Right-Click your Eclipse shortcut and select Properties&lt;br /&gt;
* At the end of the line that says Target, add -vm &amp;quot;x&amp;quot; where x is the location of a JDK (e.g., &amp;quot;C:\Program Files\Java\jdk7\bin&amp;quot;) - This step is necessary for the Maven plugin to work. (If you installed Eclipse under Linux distro after you already had a JDK installed, this probably was already done for you.)&lt;br /&gt;
* Restart Eclipse using the edited shortcut.&lt;br /&gt;
&lt;br /&gt;
==Importing the ESAPI Source==&lt;br /&gt;
&lt;br /&gt;
If you choose to use the ESAPI GitHub code, follow the instructions at [[ESAPI-Building]].  Unless you have been added to the ESAPI project as a contributor, please use the submit fixes using [https://help.github.com/articles/using-pull-requests/ Git &amp;quot;pull requests&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
If you are using EGit, as recommended, open Eclipse and:&lt;br /&gt;
* Click ''File'' -&amp;gt; ''New'' -&amp;gt; ''Other....''.&lt;br /&gt;
* From the ''Git Folder'' select '&amp;quot;Checkout Projects from Git'' (this option will only be available if you have a Git plug-in installed) and hit ''Next &amp;gt;''.&lt;br /&gt;
* Click the ''Create a new repository location'' radio button.&lt;br /&gt;
* If you are not listed as a project contributor, insert ''https://github.com/ESAPI/esapi-java-legacy.git'' as the URL.  If you are listed as a project contributor, check the github page for the URL to use. &lt;br /&gt;
* Once the directory structure appears in the window, click the URL at the top to download everything.  Then hit ''Next &amp;gt;''&lt;br /&gt;
* Select your desired project options.  For most people, the default options should be fine. When finished, click ''Next &amp;gt;''.&lt;br /&gt;
* Select your desired workspace options, then click ''Finish''.  The latest ESAPI source files will then be downloaded to your workspace.  This may take a few minutes.&lt;br /&gt;
* After the source code is finished downloading, ensure that the character type of all source code is UTF-8. In Eclipse, right click on the project directory root. At the bottom of the right-click list, choose PROPERTIES. From the PROPERTIES window, select the RESOURCES section (which is selected by default). Ensure that the &amp;quot;Text file encoding&amp;quot; section is set to OTHER-&amp;gt;UTF 8. If if it is not, change it and click APPLY-&amp;gt;OK.&lt;br /&gt;
&lt;br /&gt;
==Project Setup==&lt;br /&gt;
&lt;br /&gt;
Some configuration may be necessary for ESAPI to compile and build on your system.&lt;br /&gt;
&lt;br /&gt;
ESAPI requires the Java JRE 6 or later.&lt;br /&gt;
&lt;br /&gt;
* Once Java 6.0+ is installed, open the ''Navigator view'' in Eclipse.  If this is currently hidden, from the toolbar click ''Window'' -&amp;gt; ''Show View'' -&amp;gt; ''Navigator''.&lt;br /&gt;
* Right-click on your ESAPI project in the Navigator, mouse over ''Maven'' and click ''Enable Dependency Management''&lt;br /&gt;
** ''Note:'' If Maven is not an option when you right-click on the project, be sure the Maven plugin for eclipse is installed, as described above.&lt;br /&gt;
** ''Note:'' If ''Enable Dependency Management'' is not an option, dependency management is probably already enabled, So this step can be skipped.&lt;br /&gt;
* ''Right-click on the ESAPI project root folder'' in the Navigator view and select ''Properties''.&lt;br /&gt;
* From the left column, select ''Java Build Path''.  Under the ''Libraries'' tab, be sure a JRE or JDK is listed next to ''JRE System Library''.  If there is a red X on next to the JRE, remove the current JRE and click ''Add Library'' and select an alternate JRE.  If you are having trouble figuring out what version the current JRE is, select ''Installed JREs'' and look at the location to which each version is mapped.&lt;br /&gt;
* The Libraries tab should list ''JRE System Library'' and ''Maven Dependencies''.  If anything else is listed, it is not necessary and should be removed.  Maven now handles all dependencies.&lt;br /&gt;
* From the left column, select ''Java Compiler''.  Be sure ''Compiler compliance level'', ''Generated .class files compatibility'', and ''Source compatibility'' are all set to ''1.6''. (Note: Most of us use JDK 7 or JDK 8 to build ESAPI, but we use '-source 1.6 -target 1.6' when we compile to still support really old web applications still using JDK 1.6.) &lt;br /&gt;
* Close the properties window.&lt;br /&gt;
* ''Right-click the ESAPI project root folder'' and select ''Refresh''.&lt;br /&gt;
* From the toolbar, select ''Project'' -&amp;gt; ''Clean..'' and select the ESAPI project.  Click ''OK''.&lt;br /&gt;
* If errors remain, select ''Maven'' again, then ''Update Dependencies''.&lt;br /&gt;
* ESAPI should now be compiled.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
Building ESAPI should be easy with the new Maven integration.&lt;br /&gt;
&lt;br /&gt;
Once your environment is set up, as specified above:&lt;br /&gt;
* Right-Click your ESAPI project root folder&lt;br /&gt;
* Select ''Run As...''&lt;br /&gt;
* Select ''Run Configurations''&lt;br /&gt;
* Double Click &amp;quot;Maven Build&amp;quot; from the options on the left to create a new configuration.&lt;br /&gt;
* Name your configuration at the top.  This will be for building ESAPI without running JUnit tests.&lt;br /&gt;
* The &amp;quot;Base directory&amp;quot; should point to the root of your project&lt;br /&gt;
* The &amp;quot;Goals&amp;quot; field type &amp;quot;package&amp;quot;&lt;br /&gt;
* Any options not mentioned should be left as their default&lt;br /&gt;
* Click &amp;quot;Apply&amp;quot; to save your build configuration&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to run your configuration&lt;br /&gt;
&lt;br /&gt;
''NOTE: Jars created through building are located in the directory called &amp;quot;target&amp;quot;. ''&lt;br /&gt;
&lt;br /&gt;
==Running Demo App==&lt;br /&gt;
&lt;br /&gt;
The ESAPI Demo application has been named ''The ESAPI Swingset''.  More information about Swingset is available [http://www.owasp.org/index.php/ESAPI_Swingset here].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Enterprise Security API]]&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=211870</id>
		<title>ESAPI-BuildingWithEclipse</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=ESAPI-BuildingWithEclipse&amp;diff=211870"/>
				<updated>2016-03-27T21:18:33Z</updated>
		
		<summary type="html">&lt;p&gt;Mseil: Updated source code link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prerequisites==&lt;br /&gt;
* JDK 1.6 or later [http://www.oracle.com/technetwork/java/javase/downloads/index.html download here]. Note that you need the JDK and not just the JRE.&lt;br /&gt;
* To support the latest versions of Maven, first download Maven [https://maven.apache.org/download.cgi here]. (Note: Maven 3.0 or later is required.)&lt;br /&gt;
* Eclipse IDE for Java EE Developers 3.3.x or later [http://www.eclipse.org/downloads/ download here]. Install EGit and m2e plug-ins via &amp;quot;Help-&amp;gt;Install New Software...&amp;quot;.&lt;br /&gt;
** EGit Plug-in for Eclipse - Instructions on installing EGit plug-in can be found [https://eclipse.github.io/ here]&lt;br /&gt;
** M2E - Maven Integration for Eclipse - You can install the latest version from within Eclipse using the following [https://eclipse.org/m2e/ update site]&lt;br /&gt;
** Note that other git and Maven plug-in combinations for Eclipse are possible.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
* For Winodws, create an Eclipse shortcut&lt;br /&gt;
* Right-Click your Eclipse shortcut and select Properties&lt;br /&gt;
* At the end of the line that says Target, add -vm &amp;quot;x&amp;quot; where x is the location of a JDK (e.g., &amp;quot;C:\Program Files\Java\jdk7\bin&amp;quot;) - This step is necessary for the Maven plugin to work. (If you installed Eclipse under Linux distro after you already had a JDK installed, this probably was already done for you.)&lt;br /&gt;
* Restart Eclipse using the edited shortcut.&lt;br /&gt;
&lt;br /&gt;
==Importing the ESAPI Source==&lt;br /&gt;
&lt;br /&gt;
If you choose to use the ESAPI GitHub code, follow the instructions at [[ESAPI-Building]].  Unless you have been added to the ESAPI project as a contributor, please use the submit fixes using [https://help.github.com/articles/using-pull-requests/ Git &amp;quot;pull requests&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
If you are using EGit, as recommended, open Eclipse and:&lt;br /&gt;
* Click ''File'' -&amp;gt; ''New'' -&amp;gt; ''Other....''.&lt;br /&gt;
* From the ''Git Folder'' select '&amp;quot;Checkout Projects from Git'' (this option will only be available if you have a Git plug-in installed) and hit ''Next &amp;gt;''.&lt;br /&gt;
* Click the ''Create a new repository location'' radio button.&lt;br /&gt;
* If you are not listed as a project contributor, insert ''https://github.com/ESAPI/esapi-java-legacy.git'' as the URL.  If you are listed as a project contributor, check the Google Code page for the URL to use. (Note: if you are a contributor, when prompted for your SVN password, use your Google generated password, available from the Google Code Source page.) &lt;br /&gt;
* Once the directory structure appears in the window, click the URL at the top to download everything.  Then hit ''Next &amp;gt;''&lt;br /&gt;
* Select your desired project options.  For most people, the default options should be fine. When finished, click ''Next &amp;gt;''.&lt;br /&gt;
* Select your desired workspace options, then click ''Finish''.  The latest ESAPI source files will then be downloaded to your workspace.  This may take a few minutes.&lt;br /&gt;
* After the source code is finished downloading, ensure that the character type of all source code is UTF-8. In Eclipse, right click on the project directory root. At the bottom of the right-click list, choose PROPERTIES. From the PROPERTIES window, select the RESOURCES section (which is selected by default). Ensure that the &amp;quot;Text file encoding&amp;quot; section is set to OTHER-&amp;gt;UTF 8. If if it is not, change it and click APPLY-&amp;gt;OK.&lt;br /&gt;
&lt;br /&gt;
==Project Setup==&lt;br /&gt;
&lt;br /&gt;
Some configuration may be necessary for ESAPI to compile and build on your system.&lt;br /&gt;
&lt;br /&gt;
ESAPI requires the Java JRE 6 or later.&lt;br /&gt;
&lt;br /&gt;
* Once Java 6.0+ is installed, open the ''Navigator view'' in Eclipse.  If this is currently hidden, from the toolbar click ''Window'' -&amp;gt; ''Show View'' -&amp;gt; ''Navigator''.&lt;br /&gt;
* Right-click on your ESAPI project in the Navigator, mouse over ''Maven'' and click ''Enable Dependency Management''&lt;br /&gt;
** ''Note:'' If Maven is not an option when you right-click on the project, be sure the Maven plugin for eclipse is installed, as described above.&lt;br /&gt;
** ''Note:'' If ''Enable Dependency Management'' is not an option, dependency management is probably already enabled, So this step can be skipped.&lt;br /&gt;
* ''Right-click on the ESAPI project root folder'' in the Navigator view and select ''Properties''.&lt;br /&gt;
* From the left column, select ''Java Build Path''.  Under the ''Libraries'' tab, be sure a JRE or JDK is listed next to ''JRE System Library''.  If there is a red X on next to the JRE, remove the current JRE and click ''Add Library'' and select an alternate JRE.  If you are having trouble figuring out what version the current JRE is, select ''Installed JREs'' and look at the location to which each version is mapped.&lt;br /&gt;
* The Libraries tab should list ''JRE System Library'' and ''Maven Dependencies''.  If anything else is listed, it is not necessary and should be removed.  Maven now handles all dependencies.&lt;br /&gt;
* From the left column, select ''Java Compiler''.  Be sure ''Compiler compliance level'', ''Generated .class files compatibility'', and ''Source compatibility'' are all set to ''1.6''. (Note: Most of us use JDK 7 or JDK 8 to build ESAPI, but we use '-source 1.6 -target 1.6' when we compile to still support really old web applications still using JDK 1.6.) &lt;br /&gt;
* Close the properties window.&lt;br /&gt;
* ''Right-click the ESAPI project root folder'' and select ''Refresh''.&lt;br /&gt;
* From the toolbar, select ''Project'' -&amp;gt; ''Clean..'' and select the ESAPI project.  Click ''OK''.&lt;br /&gt;
* If errors remain, select ''Maven'' again, then ''Update Dependencies''.&lt;br /&gt;
* ESAPI should now be compiled.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
Building ESAPI should be easy with the new Maven integration.&lt;br /&gt;
&lt;br /&gt;
Once your environment is set up, as specified above:&lt;br /&gt;
* Right-Click your ESAPI project root folder&lt;br /&gt;
* Select ''Run As...''&lt;br /&gt;
* Select ''Run Configurations''&lt;br /&gt;
* Double Click &amp;quot;Maven Build&amp;quot; from the options on the left to create a new configuration.&lt;br /&gt;
* Name your configuration at the top.  This will be for building ESAPI without running JUnit tests.&lt;br /&gt;
* The &amp;quot;Base directory&amp;quot; should point to the root of your project&lt;br /&gt;
* The &amp;quot;Goals&amp;quot; field type &amp;quot;package&amp;quot;&lt;br /&gt;
* Any options not mentioned should be left as their default&lt;br /&gt;
* Click &amp;quot;Apply&amp;quot; to save your build configuration&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to run your configuration&lt;br /&gt;
&lt;br /&gt;
''NOTE: Jars created through building are located in the directory called &amp;quot;target&amp;quot;. ''&lt;br /&gt;
&lt;br /&gt;
==Running Demo App==&lt;br /&gt;
&lt;br /&gt;
The ESAPI Demo application has been named ''The ESAPI Swingset''.  More information about Swingset is available [http://www.owasp.org/index.php/ESAPI_Swingset here].&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Enterprise Security API]]&lt;/div&gt;</summary>
		<author><name>Mseil</name></author>	</entry>

	</feed>