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

Commit 48cb6f3

Browse files
committed
Update SPR-9832
1 parent 26cf60e commit 48cb6f3

File tree

13 files changed

+380
-130
lines changed

13 files changed

+380
-130
lines changed

SPR-9832/pom.xml

Lines changed: 224 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,226 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<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/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
<groupId>org.springframework.issues</groupId>
5-
<artifactId>SPR-9832</artifactId>
6-
<version>1.0-SNAPSHOT</version>
7-
8-
<properties>
9-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<org.springframework.version>3.1.2.RELEASE</org.springframework.version>
11-
<org.hamcrest.version>1.3</org.hamcrest.version>
12-
</properties>
13-
14-
<build>
15-
<plugins>
16-
<plugin>
17-
<groupId>org.apache.maven.plugins</groupId>
18-
<artifactId>maven-compiler-plugin</artifactId>
19-
<version>2.3.2</version>
20-
<configuration>
21-
<source>1.6</source>
22-
<target>1.6</target>
23-
</configuration>
24-
</plugin>
25-
<plugin>
26-
<groupId>org.apache.maven.plugins</groupId>
27-
<artifactId>maven-surefire-plugin</artifactId>
28-
<version>2.7.2</version>
29-
</plugin>
30-
</plugins>
31-
</build>
32-
33-
34-
<dependencies>
35-
<dependency>
36-
<groupId>commons-httpclient</groupId>
37-
<artifactId>commons-httpclient</artifactId>
38-
<version>3.1</version>
39-
</dependency>
40-
<dependency>
41-
<groupId>net.sf.json-lib</groupId>
42-
<artifactId>json-lib</artifactId>
43-
<version>2.4</version>
44-
<classifier>jdk15</classifier>
45-
</dependency>
46-
<dependency>
47-
<groupId>org.springframework</groupId>
48-
<artifactId>spring-web</artifactId>
49-
<version>${org.springframework.version}</version>
50-
<exclusions>
51-
<exclusion>
52-
<groupId>org.codehaus.jackson</groupId>
53-
<artifactId>jackson-mapper-asl</artifactId>
54-
</exclusion>
55-
</exclusions>
56-
</dependency>
57-
58-
<!-- Test -->
59-
<dependency>
60-
<groupId>org.springframework</groupId>
61-
<artifactId>spring-test</artifactId>
62-
<version>${org.springframework.version}</version>
63-
<scope>test</scope>
64-
</dependency>
65-
<dependency>
66-
<groupId>org.hamcrest</groupId>
67-
<artifactId>hamcrest-library</artifactId>
68-
<version>1.3</version>
69-
<scope>test</scope>
70-
</dependency>
71-
<dependency>
72-
<groupId>junit</groupId>
73-
<artifactId>junit-dep</artifactId>
74-
<version>4.10</version>
75-
<scope>test</scope>
76-
</dependency>
77-
</dependencies>
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-9832</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<name>Spring MVC Issue Reproduction Project</name>
8+
<packaging>war</packaging>
789

10+
<properties>
11+
<java-version>1.6</java-version>
12+
<org.springframework-version>3.2.0.BUILD-SNAPSHOT</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+
<dependency>
70+
<groupId>commons-httpclient</groupId>
71+
<artifactId>commons-httpclient</artifactId>
72+
<version>3.1</version>
73+
</dependency>
74+
75+
<!-- JSP API and JSTL
76+
<dependency>
77+
<groupId>javax.servlet.jsp</groupId>
78+
<artifactId>jsp-api</artifactId>
79+
<version>2.1</version>
80+
<scope>provided</scope>
81+
</dependency>
82+
<dependency>
83+
<groupId>javax.servlet</groupId>
84+
<artifactId>jstl</artifactId>
85+
<version>1.2</version>
86+
</dependency>
87+
-->
88+
89+
<!-- Apache Tiles
90+
<dependency>
91+
<groupId>org.apache.tiles</groupId>
92+
<artifactId>tiles-jsp</artifactId>
93+
<version>2.1.3</version>
94+
<exclusions>
95+
<exclusion>
96+
<groupId>commons-logging</groupId>
97+
<artifactId>commons-logging-api</artifactId>
98+
</exclusion>
99+
</exclusions>
100+
</dependency>
101+
-->
102+
103+
<!-- JSR 303 with Hibernate Validator
104+
<dependency>
105+
<groupId>javax.validation</groupId>
106+
<artifactId>validation-api</artifactId>
107+
<version>1.0.0.GA</version>
108+
</dependency>
109+
<dependency>
110+
<groupId>org.hibernate</groupId>
111+
<artifactId>hibernate-validator</artifactId>
112+
<version>4.1.0.Final</version>
113+
</dependency>
114+
-->
115+
116+
<!-- Joda Time Library
117+
<dependency>
118+
<groupId>joda-time</groupId>
119+
<artifactId>joda-time</artifactId>
120+
<version>1.6.2</version>
121+
</dependency>
122+
<dependency>
123+
<groupId>joda-time</groupId>
124+
<artifactId>joda-time-jsptags</artifactId>
125+
<version>1.0.2</version>
126+
<scope>runtime</scope>
127+
</dependency>
128+
-->
129+
130+
<!-- Apache Commons File Upload
131+
<dependency>
132+
<groupId>commons-fileupload</groupId>
133+
<artifactId>commons-fileupload</artifactId>
134+
<version>1.2.2</version>
135+
</dependency>
136+
<dependency>
137+
<groupId>commons-io</groupId>
138+
<artifactId>commons-io</artifactId>
139+
<version>2.0.1</version>
140+
</dependency>
141+
-->
142+
143+
<!-- Jackson JSON Processor
144+
<dependency>
145+
<groupId>org.codehaus.jackson</groupId>
146+
<artifactId>jackson-mapper-asl</artifactId>
147+
<version>1.8.1</version>
148+
</dependency>
149+
-->
150+
151+
<!-- Rome Atom+RSS
152+
<dependency>
153+
<groupId>rome</groupId>
154+
<artifactId>rome</artifactId>
155+
<version>1.0</version>
156+
</dependency>
157+
-->
158+
159+
<!-- Test -->
160+
<dependency>
161+
<groupId>junit</groupId>
162+
<artifactId>junit</artifactId>
163+
<version>4.8</version>
164+
<scope>test</scope>
165+
</dependency>
166+
</dependencies>
167+
168+
<repositories>
169+
<repository>
170+
<id>spring-maven-snapshot</id>
171+
<name>Springframework Maven Snapshot Repository</name>
172+
<url>http://repo.springsource.org/snapshot</url>
173+
<snapshots>
174+
<enabled>true</enabled>
175+
</snapshots>
176+
</repository>
177+
</repositories>
178+
179+
<build>
180+
<plugins>
181+
<plugin>
182+
<artifactId>maven-compiler-plugin</artifactId>
183+
<configuration>
184+
<source>${java-version}</source>
185+
<target>${java-version}</target>
186+
</configuration>
187+
</plugin>
188+
<plugin>
189+
<groupId>org.apache.maven.plugins</groupId>
190+
<artifactId>maven-dependency-plugin</artifactId>
191+
<executions>
192+
<execution>
193+
<id>install</id>
194+
<phase>install</phase>
195+
<goals>
196+
<goal>sources</goal>
197+
</goals>
198+
</execution>
199+
</executions>
200+
</plugin>
201+
<plugin>
202+
<groupId>org.apache.maven.plugins</groupId>
203+
<artifactId>maven-eclipse-plugin</artifactId>
204+
<version>2.8</version>
205+
<configuration>
206+
<downloadSources>true</downloadSources>
207+
<downloadJavadocs>false</downloadJavadocs>
208+
<wtpversion>2.0</wtpversion>
209+
</configuration>
210+
</plugin>
211+
<plugin>
212+
<artifactId>maven-surefire-plugin</artifactId>
213+
<configuration>
214+
<includes>
215+
<include>**/*Tests.java</include>
216+
</includes>
217+
<excludes>
218+
<exclude>**/*Abstract*.java</exclude>
219+
</excludes>
220+
</configuration>
221+
</plugin>
222+
</plugins>
223+
</build>
224+
79225
</project>
226+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
package org.springframework.issues;
17+
18+
import org.springframework.stereotype.Controller;
19+
import org.springframework.web.bind.annotation.RequestMapping;
20+
import org.springframework.web.bind.annotation.RequestMethod;
21+
import org.springframework.web.bind.annotation.ResponseBody;
22+
23+
@Controller
24+
public class TestController {
25+
26+
@RequestMapping(value="/calculator", method=RequestMethod.GET, produces="text/html; charset=ISO-8859-1")
27+
@ResponseBody
28+
public String calculate() {
29+
return "{lhs: \"1 U.S. dollar\",rhs: \"1 U.S. dollar\",error: \"\",icc: true}";
30+
}
31+
32+
}
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>

0 commit comments

Comments
 (0)