Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test for SWF-1572

  • Loading branch information...
commit 381b29bb3b977d564fd7a193ad26acbff82e0421 1 parent 636d3dc
Phil Webb philwebb authored
252 SWF-1572/pom.xml
View
@@ -0,0 +1,252 @@
+<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>org.springframework.webflow.issues</groupId>
+ <artifactId>SWF-1572</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Spring Web Flow Issue Reproduction Project</name>
+ <packaging>war</packaging>
+
+ <properties>
+ <java-version>1.6</java-version>
+ <org.springwebflow-version>2.4.0.BUILD-SNAPSHOT</org.springwebflow-version>
+ <org.springframework-version>3.1.1.RELEASE</org.springframework-version>
+ <org.springsecurity-version>3.0.7.RELEASE</org.springsecurity-version>
+ <org.slf4j-version>1.6.1</org.slf4j-version>
+ </properties>
+
+ <dependencies>
+ <!-- Spring Framework -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${org.springframework-version}</version>
+ <exclusions>
+ <!-- Exclude Commons Logging in favor of SLF4j -->
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+
+ <!-- Spring Web Flow -->
+ <dependency>
+ <groupId>org.springframework.webflow</groupId>
+ <artifactId>spring-webflow</artifactId>
+ <version>${org.springwebflow-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.webflow</groupId>
+ <artifactId>spring-js</artifactId>
+ <version>${org.springwebflow-version}</version>
+ </dependency>
+
+ <!-- Spring Security
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>${org.springsecurity-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-taglibs</artifactId>
+ <version>${org.springsecurity-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-config</artifactId>
+ <version>${org.springsecurity-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${org.slf4j-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${org.slf4j-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Servlet API, JSP API, JSTL -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ <!-- Apache Tiles
+ <dependency>
+ <groupId>org.apache.tiles</groupId>
+ <artifactId>tiles-jsp</artifactId>
+ <version>2.1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
+
+ <!-- Bean Validation with the Hibernate Validator -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.1.0.Final</version>
+ </dependency>
+
+ <!-- JAXB (for Hibernate Validator with Java 1.5)
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ -->
+
+ <!-- Joda Time
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.6.2</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time-jsptags</artifactId>
+ <version>1.0.2</version>
+ <scope>runtime</scope>
+ </dependency>
+ -->
+
+ <!-- JUnit -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <repositories>
+
+ <repository>
+ <id>spring-related-snapshot-releases</id>
+ <name>Spring Maven Snapshot Repository</name>
+ <url>http://maven.springframework.org/snapshot</url>
+ <releases><enabled>false</enabled></releases>
+ <snapshots><enabled>true</enabled></snapshots>
+ </repository>
+
+ <repository>
+ <id>spring-related-milestone-releases</id>
+ <name>Spring Maven Milestone Repository</name>
+ <url>http://maven.springframework.org/milestone</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java-version}</source>
+ <target>${java-version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install</id>
+ <phase>install</phase>
+ <goals>
+ <goal>sources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*Abstract*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>false</downloadJavadocs>
+ <wtpversion>2.0</wtpversion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
13 SWF-1572/src/main/java/net/gv/evaluate/expression/EvaluateExpressionAction.java
View
@@ -0,0 +1,13 @@
+package net.gv.evaluate.expression;
+
+import org.springframework.stereotype.Component;
+import org.springframework.webflow.execution.RequestContext;
+
+@Component
+public class EvaluateExpressionAction {
+
+ public void test(RequestContext context, Object obj) {
+ System.out.println(obj);
+ }
+
+}
6 SWF-1572/src/main/java/net/gv/test/NullClass.java
View
@@ -0,0 +1,6 @@
+package net.gv.test;
+
+public class NullClass {
+
+
+}
14 SWF-1572/src/main/resources/log4j.properties
View
@@ -0,0 +1,14 @@
+#log4j configuration file
+
+log.format=%d %p [%t] %c: %m%n
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=${log.format}
+
+# rootLogger
+log4j.rootLogger=warn, stdout
+
+# webflow
+log4j.logger.org.springframework.webflow=trace
+
26 SWF-1572/src/main/webapp/WEB-INF/flows/scopeSearchingProps/scopeSearchingProps.flow.xml
View
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<flow xmlns="http://www.springframework.org/schema/webflow"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/webflow
+ http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"
+ start-state="start">
+
+ <input name="test" />
+
+ <decision-state id="start">
+ <if test="test == 'kk'" then="initVariables" else="evaluateExpression" />
+ </decision-state>
+
+ <action-state id="initVariables">
+ <evaluate expression="new net.gv.evaluate.expression.EvaluateExpressionAction()" result="conversationScope.evaluateExpressionAction" />
+ <transition to="evaluateExpression" />
+ </action-state>
+
+ <action-state id="evaluateExpression">
+ <evaluate expression="evaluateExpressionAction.test(flowRequestContext, conversationScope.anObject)" />
+ <transition to="end" />
+ </action-state>
+
+ <end-state id="end" view="/aPage" />
+
+</flow>
9 SWF-1572/src/main/webapp/WEB-INF/spring/applicationContext.xml
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:webflow="http://www.springframework.org/schema/webflow-config"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+
+</beans>
58 SWF-1572/src/main/webapp/WEB-INF/spring/webmvc-config.xml
View
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.1.xsd
+ http://www.springframework.org/schema/webflow-config
+ http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
+ http://www.springframework.org/schema/mvc
+ http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
+
+ <context:component-scan base-package="net.gv" />
+
+ <webflow:flow-registry id="flowRegistry" base-path="/WEB-INF/flows"
+ flow-builder-services="flowBuilderServices">
+ <webflow:flow-location-pattern value="/**/*.flow.xml" />
+ </webflow:flow-registry>
+
+ <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="viewFactoryCreator" />
+
+ <webflow:flow-executor id="flowExecutor">
+ <webflow:flow-execution-attributes>
+ <webflow:always-redirect-on-pause value="false" />
+ <webflow:redirect-in-same-state value="false" />
+ </webflow:flow-execution-attributes>
+ </webflow:flow-executor>
+
+ <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter">
+ <property name="flowExecutor" ref="flowExecutor" />
+ <property name="redirectHttp10Compatible" value="false" />
+ </bean>
+
+ <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
+ <property name="flowRegistry" ref="flowRegistry" />
+ <property name="order" value="0" />
+ </bean>
+
+ <bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
+ <property name="viewResolvers">
+ <list>
+ <ref bean="urlViewResolver" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="urlViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
+ <property name="viewClass" value="org.springframework.web.servlet.view.InternalResourceView" />
+ <property name="suffix" value=".jsp" />
+ <property name="order" value="1" />
+ </bean>
+
+ <mvc:view-controller path="/" view-name="forward:/test" />
+
+</beans>
37 SWF-1572/src/main/webapp/WEB-INF/web.xml
View
@@ -0,0 +1,37 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+
+ <display-name>Webflow Listeners test WebApp</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/spring/applicationContext.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>webflowTest</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <init-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/spring/webmvc-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>webflowTest</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+</web-app>
5 SWF-1572/src/main/webapp/aPage.jsp
View
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>A page</h2>
+</body>
+</html>
5 SWF-1572/src/main/webapp/index.jsp
View
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.