Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit c43fce9

Browse files
committed
Add issue project for SPR-8947
1 parent 990eadf commit c43fce9

File tree

13 files changed

+354
-3
lines changed

13 files changed

+354
-3
lines changed

SPR-0000-war-xml/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>org.springframework</groupId>
2020
<artifactId>spring-context</artifactId>
21-
<version>3.2.0.BUILD-SNAPSHOT</version>
21+
<version>${org.springframework-version}</version>
2222
<exclusions>
2323
<!-- Exclude Commons Logging in favor of SLF4j -->
2424
<exclusion>
@@ -30,7 +30,7 @@
3030
<dependency>
3131
<groupId>org.springframework</groupId>
3232
<artifactId>spring-webmvc</artifactId>
33-
<version>3.2.0.BUILD-SNAPSHOT</version>
33+
<version>${org.springframework-version}</version>
3434
</dependency>
3535

3636
<!-- Logging -->

SPR-0000-war-xml/src/main/java/org/springframework/issues/.gitignore

Whitespace-only changes.

SPR-0000-war-xml/src/main/webapp/WEB-INF/spring/servlet-context.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
<property name="suffix" value=".jsp" />
1818
</bean>
1919

20-
<context:component-scan base-package="org.springframework.web.issues" />
20+
<context:component-scan base-package="org.springframework.issues" />
2121

2222
</beans>

SPR-0000-war-xml/src/test/java/org/springframework/issues/.gitignore

Whitespace-only changes.

SPR-8947/pom.xml

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.springframework.issues</groupId>
5+
<artifactId>SPR-8947</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<name>Spring MVC Issue Reproduction Project</name>
8+
<packaging>war</packaging>
9+
10+
<properties>
11+
<java-version>1.6</java-version>
12+
<org.springframework-version>3.0.7.RELEASE</org.springframework-version>
13+
<org.slf4j-version>1.6.1</org.slf4j-version>
14+
</properties>
15+
16+
<dependencies>
17+
<!-- Spring Framework -->
18+
<dependency>
19+
<groupId>org.springframework</groupId>
20+
<artifactId>spring-context</artifactId>
21+
<version>${org.springframework-version}</version>
22+
<exclusions>
23+
<!-- Exclude Commons Logging in favor of SLF4j -->
24+
<exclusion>
25+
<groupId>commons-logging</groupId>
26+
<artifactId>commons-logging</artifactId>
27+
</exclusion>
28+
</exclusions>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.springframework</groupId>
32+
<artifactId>spring-webmvc</artifactId>
33+
<version>${org.springframework-version}</version>
34+
</dependency>
35+
36+
<!-- Logging -->
37+
<dependency>
38+
<groupId>org.slf4j</groupId>
39+
<artifactId>slf4j-api</artifactId>
40+
<version>${org.slf4j-version}</version>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.slf4j</groupId>
44+
<artifactId>jcl-over-slf4j</artifactId>
45+
<version>${org.slf4j-version}</version>
46+
<scope>runtime</scope>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.slf4j</groupId>
50+
<artifactId>slf4j-log4j12</artifactId>
51+
<version>${org.slf4j-version}</version>
52+
<scope>runtime</scope>
53+
</dependency>
54+
<dependency>
55+
<groupId>log4j</groupId>
56+
<artifactId>log4j</artifactId>
57+
<version>1.2.16</version>
58+
<scope>runtime</scope>
59+
</dependency>
60+
61+
<!-- Servlet API -->
62+
<dependency>
63+
<groupId>javax.servlet</groupId>
64+
<artifactId>servlet-api</artifactId>
65+
<version>2.5</version>
66+
<scope>provided</scope>
67+
</dependency>
68+
69+
<!-- JSP API and JSTL
70+
<dependency>
71+
<groupId>javax.servlet.jsp</groupId>
72+
<artifactId>jsp-api</artifactId>
73+
<version>2.1</version>
74+
<scope>provided</scope>
75+
</dependency>
76+
<dependency>
77+
<groupId>javax.servlet</groupId>
78+
<artifactId>jstl</artifactId>
79+
<version>1.2</version>
80+
</dependency>
81+
-->
82+
83+
<!-- Apache Tiles
84+
<dependency>
85+
<groupId>org.apache.tiles</groupId>
86+
<artifactId>tiles-jsp</artifactId>
87+
<version>2.1.3</version>
88+
<exclusions>
89+
<exclusion>
90+
<groupId>commons-logging</groupId>
91+
<artifactId>commons-logging-api</artifactId>
92+
</exclusion>
93+
</exclusions>
94+
</dependency>
95+
-->
96+
97+
<!-- JSR 303 with Hibernate Validator
98+
<dependency>
99+
<groupId>javax.validation</groupId>
100+
<artifactId>validation-api</artifactId>
101+
<version>1.0.0.GA</version>
102+
</dependency>
103+
<dependency>
104+
<groupId>org.hibernate</groupId>
105+
<artifactId>hibernate-validator</artifactId>
106+
<version>4.1.0.Final</version>
107+
</dependency>
108+
-->
109+
110+
<!-- Joda Time Library
111+
<dependency>
112+
<groupId>joda-time</groupId>
113+
<artifactId>joda-time</artifactId>
114+
<version>1.6.2</version>
115+
</dependency>
116+
<dependency>
117+
<groupId>joda-time</groupId>
118+
<artifactId>joda-time-jsptags</artifactId>
119+
<version>1.0.2</version>
120+
<scope>runtime</scope>
121+
</dependency>
122+
-->
123+
124+
<!-- Apache Commons File Upload
125+
<dependency>
126+
<groupId>commons-fileupload</groupId>
127+
<artifactId>commons-fileupload</artifactId>
128+
<version>1.2.2</version>
129+
</dependency>
130+
<dependency>
131+
<groupId>commons-io</groupId>
132+
<artifactId>commons-io</artifactId>
133+
<version>2.0.1</version>
134+
</dependency>
135+
-->
136+
137+
<!-- Jackson JSON Processor
138+
<dependency>
139+
<groupId>org.codehaus.jackson</groupId>
140+
<artifactId>jackson-mapper-asl</artifactId>
141+
<version>1.8.1</version>
142+
</dependency>
143+
-->
144+
145+
<!-- Rome Atom+RSS
146+
<dependency>
147+
<groupId>rome</groupId>
148+
<artifactId>rome</artifactId>
149+
<version>1.0</version>
150+
</dependency>
151+
-->
152+
153+
<!-- Test -->
154+
<dependency>
155+
<groupId>junit</groupId>
156+
<artifactId>junit</artifactId>
157+
<version>4.8</version>
158+
<scope>test</scope>
159+
</dependency>
160+
</dependencies>
161+
162+
<repositories>
163+
<repository>
164+
<id>spring-maven-snapshot</id>
165+
<name>Springframework Maven Snapshot Repository</name>
166+
<url>http://repo.springsource.org/snapshot</url>
167+
<snapshots>
168+
<enabled>true</enabled>
169+
</snapshots>
170+
</repository>
171+
</repositories>
172+
173+
<build>
174+
<plugins>
175+
<plugin>
176+
<artifactId>maven-compiler-plugin</artifactId>
177+
<configuration>
178+
<source>${java-version}</source>
179+
<target>${java-version}</target>
180+
</configuration>
181+
</plugin>
182+
<plugin>
183+
<groupId>org.apache.maven.plugins</groupId>
184+
<artifactId>maven-dependency-plugin</artifactId>
185+
<executions>
186+
<execution>
187+
<id>install</id>
188+
<phase>install</phase>
189+
<goals>
190+
<goal>sources</goal>
191+
</goals>
192+
</execution>
193+
</executions>
194+
</plugin>
195+
<plugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-eclipse-plugin</artifactId>
198+
<version>2.8</version>
199+
<configuration>
200+
<downloadSources>true</downloadSources>
201+
<downloadJavadocs>false</downloadJavadocs>
202+
<wtpversion>2.0</wtpversion>
203+
</configuration>
204+
</plugin>
205+
<plugin>
206+
<artifactId>maven-surefire-plugin</artifactId>
207+
<configuration>
208+
<includes>
209+
<include>**/*Tests.java</include>
210+
</includes>
211+
<excludes>
212+
<exclude>**/*Abstract*.java</exclude>
213+
</excludes>
214+
</configuration>
215+
</plugin>
216+
</plugins>
217+
</build>
218+
219+
</project>
220+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 2002-2012 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.issues;
18+
19+
import org.springframework.stereotype.Controller;
20+
import org.springframework.web.bind.annotation.RequestMapping;
21+
import org.springframework.web.bind.annotation.RequestMethod;
22+
import org.springframework.web.bind.annotation.ResponseBody;
23+
24+
@Controller
25+
public class TrailingSlashController {
26+
27+
@RequestMapping(value = "/{folderName}", method = RequestMethod.GET)
28+
@ResponseBody
29+
public String first() {
30+
return "without trailing slash";
31+
}
32+
33+
@RequestMapping(value = "/{folderName}/", method = RequestMethod.GET)
34+
@ResponseBody
35+
public String second() {
36+
return "with trailing slash";
37+
}
38+
39+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
log4j.rootCategory=INFO, stdout
2+
3+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5+
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
6+
7+
log4j.category.org.springframework.web=DEBUG
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="
5+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
6+
7+
<!-- Root Context: defines shared resources visible to all other web components -->
8+
9+
</beans>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:mvc="http://www.springframework.org/schema/mvc"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xsi:schemaLocation="
7+
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
8+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
9+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
10+
11+
<mvc:annotation-driven />
12+
13+
<mvc:view-controller path="/" view-name="home" />
14+
15+
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
16+
<property name="prefix" value="/WEB-INF/views/" />
17+
<property name="suffix" value=".jsp" />
18+
</bean>
19+
20+
<context:component-scan base-package="org.springframework.issues" />
21+
22+
</beans>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6+
<title>Home</title>
7+
</head>
8+
<body>
9+
<h1>Home</h1>
10+
</body>
11+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
5+
6+
<context-param>
7+
<param-name>contextConfigLocation</param-name>
8+
<param-value>/WEB-INF/spring/root-context.xml</param-value>
9+
</context-param>
10+
11+
<listener>
12+
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
13+
</listener>
14+
15+
<servlet>
16+
<servlet-name>appServlet</servlet-name>
17+
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
18+
<init-param>
19+
<param-name>contextConfigLocation</param-name>
20+
<param-value>/WEB-INF/spring/servlet-context.xml</param-value>
21+
</init-param>
22+
<load-on-startup>1</load-on-startup>
23+
</servlet>
24+
25+
<servlet-mapping>
26+
<servlet-name>appServlet</servlet-name>
27+
<url-pattern>/</url-pattern>
28+
</servlet-mapping>
29+
30+
<!-- Disables Servlet Container welcome file handling. Needed for compatibility
31+
with Servlet 3.0 and Tomcat 7.0 -->
32+
<welcome-file-list>
33+
<welcome-file></welcome-file>
34+
</welcome-file-list>
35+
36+
</web-app>

SPR-8947/src/test/java/org/springframework/issues/.gitignore

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
log4j.rootCategory=INFO, stdout
2+
3+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5+
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
6+
7+
log4j.category.org.springframework.web=DEBUG

0 commit comments

Comments
 (0)