-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created proper multi-module maven structure:
* unified naming conventions for sub-modules * added possibility to deploy the test JSP application from maven using a profile * removed unnecessary files (the project should be IDE agnostic) Changed Language Level to Java 1.8 Fixes issue #128
- Loading branch information
1 parent
db16d99
commit bb3421e
Showing
45 changed files
with
436 additions
and
552 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
JavaServerFaces/src/main/java/com/mkyong/common/HelloBean.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
csrfguard-test/.settings/org.eclipse.wst.common.project.facet.core.xml
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
csrfguard-test/.settings/org.eclipse.wst.jsdt.ui.superType.container
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
csrfguard-test/.settings/org.eclipse.wst.jsdt.ui.superType.name
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
75 changes: 43 additions & 32 deletions
75
JavaServerFaces/pom.xml → csrfguard-test/csrfguard-test-jsf/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,82 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.mkyong.common</groupId> | ||
<artifactId>JavaServerFaces</artifactId> | ||
|
||
<parent> | ||
<groupId>org.owasp</groupId> | ||
<artifactId>csrfguard-test</artifactId> | ||
<version>3.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>csrfguard-test-jsf</artifactId> | ||
<packaging>war</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>JavaServerFaces Maven Webapp</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<name>OWASP CsrfGuard JSF Test WebApp</name> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>${maven-war-plugin.version}</version> | ||
<configuration> | ||
<webResources> | ||
<resource> | ||
<directory>${basedir}/src/main/webapp</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*.xhtml</include> | ||
</includes> | ||
</resource> | ||
</webResources> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.owasp</groupId> | ||
<artifactId>csrfguard</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.sun.faces</groupId> | ||
<artifactId>jsf-api</artifactId> | ||
<version>2.1.7</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.faces</groupId> | ||
<artifactId>jsf-impl</artifactId> | ||
<version>2.1.7</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.owasp</groupId> | ||
<artifactId>csrfguard</artifactId> | ||
<version>3.1.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>jstl</artifactId> | ||
<version>1.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>servlet-api</artifactId> | ||
<version>2.5</version> | ||
<version>${servlet-api.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.servlet.jsp</groupId> | ||
<artifactId>jsp-api</artifactId> | ||
<version>2.1</version> | ||
<version>${jsp-api.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.sun.el</groupId> | ||
<artifactId>el-ri</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<finalName>JavaServerFaces</finalName> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.1</version> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
50 changes: 50 additions & 0 deletions
50
csrfguard-test/csrfguard-test-jsf/src/main/java/org/owasp/csrfguard/test/HelloBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* The OWASP CSRFGuard Project, BSD License | ||
* Eric Sheridan (eric@infraredsecurity.com), Copyright (c) 2011 | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 3. Neither the name of OWASP nor the names of its contributors may be used | ||
* to endorse or promote products derived from this software without specific | ||
* prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
package org.owasp.csrfguard.test; | ||
|
||
import javax.faces.bean.ManagedBean; | ||
import javax.faces.bean.SessionScoped; | ||
import java.io.Serializable; | ||
|
||
@ManagedBean | ||
@SessionScoped | ||
public class HelloBean implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private String name; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
File renamed without changes.
13 changes: 6 additions & 7 deletions
13
...src/main/webapp/WEB-INF/glassfish-web.xml → ...src/main/webapp/WEB-INF/glassfish-web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd"> | ||
<glassfish-web-app error-url=""> | ||
<class-loader delegate="true"/> | ||
<jsp-config> | ||
<property name="keepgenerated" value="true"> | ||
<description>Keep a copy of the generated servlet class' java code.</description> | ||
</property> | ||
</jsp-config> | ||
<class-loader delegate="true"/> | ||
<jsp-config> | ||
<property name="keepgenerated" value="true"> | ||
<description>Keep a copy of the generated servlet class' java code.</description> | ||
</property> | ||
</jsp-config> | ||
</glassfish-web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.