Upgrade to Tomcat 8.5.11

This commit is contained in:
Brian Clozel
2017-01-20 09:55:33 +01:00
parent 78a23be9bc
commit 35b67a54d2
930 changed files with 32832 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.springframework.tests.sample.beans.TestBean">
<constructor-arg value="${name}"/>
</bean>
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
</beans>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd" [
<!ENTITY contextInclude SYSTEM "org/springframework/web/context/WEB-INF/contextInclude.xml">
]>
<beans>
<import resource="resources/messageSource.xml"/>
<import resource="/resources/../resources/themeSource.xml"/>
<bean id="lifecyclePostProcessor" class="org.springframework.tests.sample.beans.LifecycleBean$PostProcessor"/>
<!--
<bean
name="performanceMonitor" class="org.springframework.context.support.TestListener"
/>
-->
<!--
<bean name="aca" class="org.springframework.context.ACATest">
</bean>
<bean name="aca-prototype" class="org.springframework.context.ACATest" scope="prototype">
</bean>
-->
<bean id="beanThatListens" class="org.springframework.context.BeanThatListens"/>
<bean id="parentListener" class="org.springframework.context.TestListener"/>
<!-- Inherited tests -->
<!-- name and age values will be overridden by myinit.properties" -->
<bean id="rod" class="org.springframework.tests.sample.beans.TestBean">
<property name="name">
<value>dummy</value>
</property>
<property name="age">
<value>-1</value>
</property>
</bean>
<!--
Tests of lifecycle callbacks
-->
<bean id="mustBeInitialized"
class="org.springframework.tests.sample.beans.MustBeInitialized">
</bean>
<bean id="lifecycle"
class="org.springframework.context.LifecycleContextBean"
init-method="declaredInitMethod">
<property name="initMethodDeclared"><value>true</value></property>
</bean>
&contextInclude;
<bean id="myOverride" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
<property name="location">
<value>/org/springframework/web/context/WEB-INF/myoverride.properties</value>
</property>
</bean>
<bean id="myPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:/org/springframework/web/context/WEB-INF/myplace*.properties</value>
<value>classpath:/org/springframework/web/context/WEB-INF/myover*.properties</value>
<value>${myDir}/myover*.properties</value>
</list>
</property>
</bean>
<bean id="init-and-ib"
class="org.springframework.web.context.XmlWebApplicationContextTests$InitAndIB"
lazy-init="true"
init-method="customInit"
destroy-method="customDestroy"
/>
</beans>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="aca" class="org.springframework.context.ACATester"/>
<bean id="aca-prototype" class="org.springframework.context.ACATester" scope="prototype"/>
<bean id="testListener" class="org.springframework.context.TestListener"/>
<bean id="roderick" parent="rod">
<property name="name"><value>Roderick</value></property>
<property name="age"><value>31</value></property>
</bean>
<bean id="kathy" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
<bean id="kerry" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Kerry</value></property>
<property name="age"><value>34</value></property>
<property name="spouse"><ref bean="rod"/></property>
</bean>
<bean id="typeMismatch" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name"><value>typeMismatch</value></property>
<property name="age"><value>34x</value></property>
<property name="spouse"><ref bean="rod"/></property>
</bean>
<!-- Factory beans are automatically treated
differently -->
<bean id="singletonFactory"
class="org.springframework.tests.sample.beans.factory.DummyFactory">
</bean>
<bean id="prototypeFactory"
class="org.springframework.tests.sample.beans.factory.DummyFactory">
<property name="singleton"><value>false</value></property>
</bean>
<bean id="listenerVeto" class="org.springframework.tests.sample.beans.TestBean">
<!-- <listener property="age" beanRef="agistListener" /> -->
<property name="name"><value>listenerVeto</value></property>
<property name="age"><value>66</value></property>
</bean>
<bean id="validEmpty" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -0,0 +1,6 @@
code1=message1
code2=message2
# Example taken from the javadocs for the java.text.MessageFormat class
message.format.example1=At '{1,time}' on "{1,date}", there was "{2}" on planet {0,number,integer}.
message.format.example2=This is a test message in the message catalog with no args.

View File

@@ -0,0 +1,2 @@
# Example taken from the javadocs for the java.text.MessageFormat class
message.format.example1=At '{1,time}' on "{1,date}", there was "{2}" on station number {0,number,integer}.

View File

@@ -0,0 +1,5 @@
code1=message1
# Example taken from the javadocs for the java.text.MessageFormat class
message.format.example1=At '{1,time}' on "{1,date}", there was "{2}" on planet {0,number,integer}.
message.format.example2=This is a test message in the message catalog with no args.

View File

@@ -0,0 +1,6 @@
<!-- Include snippet to be loaded via entity reference in applicationContext.xml -->
<bean id="father" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>yetanotherdummy</value></property>
</bean>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
<bean id="servletContextAwareBean" class="org.springframework.web.context.ServletContextAwareBean"/>
<bean id="servletConfigAwareBean" class="org.springframework.web.context.ServletConfigAwareBean"/>
</beans>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="fail" class="java.lang.Integer"/>
</beans>

View File

@@ -0,0 +1,2 @@
code1=message1x
code3=message3

View File

@@ -0,0 +1,3 @@
father.name=Albert
rod.age=31
rod.name=Roderick

View File

@@ -0,0 +1,4 @@
useCodeAsDefaultMessage=false
message-file=context-messages
objectName=test:service=myservice
theme-base=org/springframework/web/context/WEB-INF/

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="useCodeAsDefaultMessage">
<value>${useCodeAsDefaultMessage}</value>
</property>
<property name="basenames">
<list>
<value>org/springframework/web/context/WEB-INF/${message-file}</value>
<value>org/springframework/web/context/WEB-INF/more-context-messages</value>
</list>
</property>
</bean>
<bean id="messageSourceString" factory-bean="messageSource" factory-method="toString"/>
<bean id="currentTimeMillis" class="javax.management.ObjectName" factory-method="getInstance">
<constructor-arg value="${objectName}"/>
</bean>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">
<property name="basenamePrefix">
<value>${theme-base}</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="rob" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="dummy"/>
<property name="age" value="-1"/>
</bean>
<bean id="rodProto" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="dummy"/>
<property name="age" value="-1"/>
</bean>
</beans>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename"><value>org/springframework/web/context/WEB-INF/test-messages</value></property>
</bean>
<bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">
<property name="basenamePrefix"><value>org/springframework/web/context/WEB-INF/test-</value></property>
</bean>
<bean id="aca" class="org.springframework.context.ACATester"/>
<bean id="aca-prototype" class="org.springframework.context.ACATester" scope="prototype"/>
<bean id="rod" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="age"><value>31</value></property>
<property name="spouse"><ref bean="father"/></property>
</bean>
<bean id="testListener" class="org.springframework.context.TestListener"/>
<bean id="roderick" parent="rod">
<property name="name"><value>Roderick</value></property>
<property name="age"><value>31</value></property>
</bean>
<bean id="kathy" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
<bean id="kerry" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Kerry</value></property>
<property name="age"><value>34</value></property>
<property name="spouse"><ref bean="rod"/></property>
</bean>
<bean id="typeMismatch" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name"><value>typeMismatch</value></property>
<property name="age"><value>34x</value></property>
<property name="spouse"><ref bean="rod"/></property>
</bean>
<bean id="singletonFactory" class="org.springframework.tests.sample.beans.factory.DummyFactory">
</bean>
<bean id="prototypeFactory" class="org.springframework.tests.sample.beans.factory.DummyFactory">
<property name="singleton"><value>false</value></property>
</bean>
<bean id="listenerVeto" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>listenerVeto</value></property>
<property name="age"><value>66</value></property>
</bean>
<bean id="validEmpty" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -0,0 +1 @@
theme.example2=test-message2

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="rod" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="age"><value>31</value></property>
</bean>
<bean id="kerryX" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Kerry</value></property>
<property name="age"><value>34</value></property>
<property name="spouse"><ref bean="rod"/></property>
</bean>
</beans>

View File

@@ -0,0 +1,2 @@
theme.example1=This is a test message in the theme message catalog with no args.
theme.example2=message2

View File

@@ -0,0 +1 @@
theme.example1=This is a test message in the theme message catalog.

View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>ticket-webapp</display-name>
<description>Web interface for ticket application</description>
<distributable/>
<!--
<listener>
<listener-class>com.wrox.j2eedd.ticket.web.SessionCleanupListener</listener-class>
</listener>
-->
<!-- This servlet must be loaded first to configure the log4j
system and create the WebApplicationContext
-->
<servlet>
<servlet-name>config</servlet-name>
<servlet-class>org.springframework.framework.web.context.ContextLoaderServlet</servlet-class>
<init-param>
<param-name>contextClass</param-name>
<param-value>org.springframework.framework.web.context.XMLWebApplicationContext</param-value>
</init-param>
<init-param>
<param-name>log4jPropertiesUrl</param-name>
<param-value>/WEB-INF/log4j_PRODUCTION.properties</param-value>
</init-param>
<!-- This is essential -->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>boxOffice</servlet-name>
<servlet-class>org.springframework.framework.web.workflow.CommandServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>boxOffice</servlet-name>
<url-pattern>/*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>config</servlet-name>
<url-pattern>/context/context.html</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<welcome-file-list>
<!-- Simply doesn't work to a servlet -->
<welcome-file>/welcome.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>403</error-code>
<location>/jsp/layout/twocolumn/403-Forbidden.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/jsp/layout/twocolumn/404-NotFound.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/jsp/layout/twocolumn/uncaughtException.jsp</location>
</error-page>
<taglib>
<taglib-uri>/bind</taglib-uri>
<taglib-location>/WEB-INF/tlds/b11.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/events</taglib-uri>
<taglib-location>/WEB-INF/tlds/event11.tld</taglib-location>
</taglib>
<security-constraint>
<web-resource-collection>
<web-resource-name>SalesInfo
</web-resource-name>
<url-pattern>purchase.html</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>registeredUsers</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<!-- Used only for BASIC authentication: only included because ServletUnit needs it -->
<realm-name>ticket</realm-name>
<form-login-config>
<form-login-page>login.jsp</form-login-page>
<form-error-page>loginError.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>registeredUsers</role-name>
</security-role>
<ejb-ref>
<ejb-ref-name>ejb/FixtureManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.wrox.j2eedd.ticket.ejb.fixturemanager.FixtureManagerRemoteHome</home>
<remote>com.wrox.j2eedd.ticket.ejb.fixturemanager.FixtureManagerRemote</remote>
<ejb-link>FixtureManager</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/BoxOffice</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.wrox.j2eedd.ticket.ejb.booking.BoxOfficeRemoteHome</home>
<remote>com.wrox.j2eedd.ticket.ejb.booking.BoxOfficeRemote</remote>
<ejb-link>BookingManager</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/CustomerManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.wrox.j2eedd.ticket.ejb.customer.CustomerManagerRemoteHoms</home>
<remote>com.wrox.j2eedd.ticket.ejb.customer.CustomerManagerRemote</remote>
<ejb-link>CustomerManager</ejb-link>
</ejb-ref>
</web-app>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: beans1.xml,v 1.3 2006/08/20 19:08:40 jhoeller Exp $ -->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="beans1.bean1" class="org.springframework.beans.factory.access.TestBean">
<property name="name"><value>beans1.bean1</value></property>
</bean>
<bean id="beans1.bean2" class="org.springframework.beans.factory.access.TestBean">
<property name="name"><value>bean2</value></property>
<property name="objRef"><ref bean="beans1.bean2"/></property>
</bean>
</beans>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<!-- We are only using one definition file for the purposes of this test, since we do not have multiple
classloaders available in the environment to allow combining multiple files of the same name, but
of course the contents within could be spread out across multiple files of the same name withing
different jars -->
<beans>
<!-- this definition could be inside one beanRefFactory.xml file -->
<bean id="a.qualified.name.of.some.sort"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<property name="configLocation" value="org/springframework/web/context/beans1.xml"/>
</bean>
<!-- while the following two could be inside another, also on the classpath,
perhaps coming from another component jar -->
<bean id="another.qualified.name"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<property name="configLocation" value="org/springframework/web/context/beans1.xml"/>
<property name="parent" ref="a.qualified.name.of.some.sort"/>
</bean>
<alias name="another.qualified.name" alias="a.qualified.name.which.is.an.alias"/>
</beans>

View File

@@ -0,0 +1,3 @@
form.(class)=org.springframework.web.servlet.view.InternalResourceView
form.requestContextAttribute=rc
form.url=myform.jsp

View File

@@ -0,0 +1 @@
<html><body>${hello}</body></html>

View File

@@ -0,0 +1,12 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My First Web Application Using Spring MVC</title>
</head>
<body>
${hello}
</body>
</html>

View File

@@ -0,0 +1 @@
<html><body>${hello}</body></html>

View File

@@ -0,0 +1,7 @@
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
<definition name="index" template="/WEB-INF/index.jsp" />
</tiles-definitions>

View File

@@ -0,0 +1 @@
test stylesheet content

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven>
<mvc:argument-resolvers>
<bean class="org.springframework.web.servlet.config.TestWebArgumentResolver"/>
<bean class="org.springframework.web.servlet.config.TestHandlerMethodArgumentResolver"/>
<ref bean="customArgumentResolver" />
</mvc:argument-resolvers>
</mvc:annotation-driven>
<bean id="customArgumentResolver" class="org.springframework.web.servlet.config.TestHandlerMethodArgumentResolver"/>
</beans>

View File

@@ -0,0 +1,20 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven>
<mvc:async-support default-timeout="2500" task-executor="executor">
<mvc:callable-interceptors>
<bean class="org.springframework.web.servlet.config.MvcNamespaceTests.TestCallableProcessingInterceptor" />
</mvc:callable-interceptors>
<mvc:deferred-result-interceptors>
<bean class="org.springframework.web.servlet.config.MvcNamespaceTests.TestDeferredResultProcessingInterceptor" />
</mvc:deferred-result-interceptors>
</mvc:async-support>
</mvc:annotation-driven>
<bean id="executor" class="org.springframework.scheduling.concurrent.ConcurrentTaskExecutor" />
</beans>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang" />
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor">
<property name="paramName" value="style" />
</bean>
</mvc:interceptors>
</beans>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<mvc:annotation-driven content-negotiation-manager="mvcContentNegotiationManager" />
<mvc:view-resolvers>
<mvc:content-negotiation/>
</mvc:view-resolvers>
<bean id="mvcContentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="mediaTypes">
<value>
xml=application/rss+xml
</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- <mvc:cors /> element before <mvc:annotation-driven /> one -->
<mvc:cors>
<mvc:mapping path="/**" />
</mvc:cors>
<mvc:annotation-driven />
</beans>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
<mvc:cors>
<mvc:mapping path="/api/**" allowed-origins="http://domain1.com, http://domain2.com"
allowed-methods="GET, PUT" allowed-headers="header1, header2, header3"
exposed-headers="header1, header2" allow-credentials="false" max-age="123" />
<mvc:mapping path="/resources/**" allowed-origins="http://domain1.com" />
</mvc:cors>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven conversion-service="conversionService" />
<bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
</beans>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven validator="validator"
ignore-default-model-on-redirect="true" enable-matrix-variables="true" />
<bean id="validator" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestValidator" />
</beans>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:default-servlet-handler default-servlet-name="custom" />
</beans>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:default-servlet-handler />
</beans>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
<mvc:interceptor>
<mvc:mapping path="/**" />
<mvc:exclude-mapping path="/admin/**" />
<mvc:exclude-mapping path="/images/**" />
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<mvc:interceptors path-matcher="pathMatcher">
<mvc:interceptor>
<mvc:mapping path="/accounts/[0-9]*" />
<bean class="org.springframework.web.servlet.handler.UserRoleAuthorizationInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<bean id="pathMatcher" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestPathMatcher"/>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven message-codes-resolver="messageCodesResolver"/>
<bean id="messageCodesResolver" class="org.springframework.web.servlet.config.TestMessageCodesResolver"/>
</beans>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven>
<mvc:message-converters register-defaults="false">
<ref bean="stringConverter" />
<ref bean="resourceConverter" />
</mvc:message-converters>
</mvc:annotation-driven>
<bean id="stringConverter" class="org.springframework.http.converter.StringHttpMessageConverter"/>
<bean id="resourceConverter" class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
</beans>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven>
<mvc:message-converters>
<bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
<bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
</mvc:message-converters>
</mvc:annotation-driven>
</beans>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" />
<mvc:annotation-driven>
<mvc:path-matching
path-helper="pathHelper"
path-matcher="pathMatcher" />
</mvc:annotation-driven>
<mvc:view-controller path="/" view-name="home"/>
<mvc:view-controller path="/test" view-name="test"/>
<bean id="pathMatcher" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestPathMatcher" />
<bean id="pathHelper" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestPathHelper" />
</beans>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager">
<mvc:path-matching
suffix-pattern="true"
trailing-slash="false"
registered-suffixes-only="true"
path-helper="pathHelper"
path-matcher="pathMatcher" />
</mvc:annotation-driven>
<bean id="pathMatcher" class="org.springframework.web.servlet.config.TestPathMatcher" />
<bean id="pathHelper" class="org.springframework.web.servlet.config.TestPathHelper" />
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="mediaTypes">
<value>
xml=application/rss+xml
</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/">
<mvc:cache-control max-age="3600" s-maxage="1800" cache-public="true"/>
<mvc:resource-chain resource-cache="false" auto-registration="false">
<mvc:resolvers>
<mvc:version-resolver>
<mvc:fixed-version-strategy version="abc" patterns="/**/*.js"/>
<mvc:version-strategy patterns="/**">
<bean class="org.springframework.web.servlet.resource.ContentVersionStrategy" />
</mvc:version-strategy>
</mvc:version-resolver>
<ref bean="gzipResourceResolver"/>
<bean class="org.springframework.web.servlet.resource.PathResourceResolver"/>
</mvc:resolvers>
<mvc:transformers>
<bean class="org.springframework.web.servlet.resource.CachingResourceTransformer">
<constructor-arg name="cache" ref="resourceCache" />
</bean>
<bean class="org.springframework.web.servlet.resource.AppCacheManifestTransformer"/>
</mvc:transformers>
</mvc:resource-chain>
</mvc:resources>
<bean id="gzipResourceResolver" class="org.springframework.web.servlet.resource.GzipResourceResolver" />
<bean id="resourceCache" class="org.springframework.cache.concurrent.ConcurrentMapCache">
<constructor-arg name="name" value="resourceCache"/>
</bean>
</beans>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2002-2014 the original author or authors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/">
<mvc:resource-chain resource-cache="true" cache-manager="resourceCache" cache-name="test-resource-cache">
<mvc:resolvers>
<mvc:version-resolver>
<mvc:fixed-version-strategy version="abc" patterns="/**/*.js"/>
<mvc:content-version-strategy patterns="/**"/>
</mvc:version-resolver>
</mvc:resolvers>
<mvc:transformers>
<bean class="org.springframework.web.servlet.resource.AppCacheManifestTransformer"/>
</mvc:transformers>
</mvc:resource-chain>
</mvc:resources>
<bean id="resourceCache" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestCacheManager"/>
</beans>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" cache-period="3600" order="5"/>
</beans>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" />
</beans>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven>
<mvc:return-value-handlers>
<bean class="org.springframework.web.servlet.config.TestHandlerMethodReturnValueHandler"/>
<ref bean="customHandler" />
</mvc:return-value-handlers>
</mvc:annotation-driven>
<bean id="customHandler" class="org.springframework.web.servlet.config.TestHandlerMethodReturnValueHandler"/>
</beans>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:view-controller path="/path" view-name="home"/>
<mvc:redirect-view-controller path="/old" redirect-url="/new"/>
<mvc:status-controller path="/bad" status-code="404"/>
</beans>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven/>
<mvc:view-controller path="/foo"/>
<mvc:view-controller path="/bar" view-name="baz"/>
<mvc:view-controller path="/" view-name="root"/>
<mvc:redirect-view-controller path="/old" redirect-url="/new"
context-relative="false" status-code="308" keep-query-params="true"/>
<mvc:status-controller path="/bad" status-code="404"/>
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/>
</mvc:interceptors>
</beans>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd">
<!--
View resolution finds the ContentNegotiationManager created by or
registered with <mvc:annotation-driven>. Or in its absence simply declare it.
-->
<bean id="mvcContentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"/>
<mvc:view-resolvers>
<mvc:content-negotiation use-not-acceptable="true">
<mvc:default-views>
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
</mvc:default-views>
</mvc:content-negotiation>
<mvc:bean-name/>
<mvc:jsp/>
<mvc:tiles/>
<mvc:freemarker/>
<mvc:groovy/>
<mvc:script-template/>
</mvc:view-resolvers>
<mvc:tiles-configurer check-refresh="true">
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles1.xml"/>
</mvc:tiles-configurer>
<mvc:freemarker-configurer>
<mvc:template-loader-path location="/org/springframework/web/servlet/view"/>
</mvc:freemarker-configurer>
<mvc:groovy-configurer/>
<mvc:script-template-configurer engine-name="nashorn" render-function="render"/>
</beans>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<mvc:view-resolvers order="123">
<mvc:bean-name/>
</mvc:view-resolvers>
</beans>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd">
<mvc:view-resolvers>
<mvc:bean-name/>
<mvc:jsp view-class="org.springframework.web.servlet.view.InternalResourceView"/>
<mvc:tiles/>
<mvc:freemarker prefix="freemarker-" suffix=".freemarker" view-names="my*,*Report"/>
<mvc:groovy/>
<mvc:script-template/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"/>
<ref bean="customResolver"/>
</mvc:view-resolvers>
<bean id="customResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"/>
<mvc:tiles-configurer check-refresh="true" validate-definitions="true"
definitions-factory="org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory"
preparer-factory="org.springframework.web.servlet.view.tiles3.SpringBeanPreparerFactory">
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles1.xml"/>
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles2.xml"/>
</mvc:tiles-configurer>
<mvc:freemarker-configurer>
<mvc:template-loader-path location="/"/>
<mvc:template-loader-path location="/test"/>
</mvc:freemarker-configurer>
<mvc:groovy-configurer resource-loader-path="/test" cache-templates="false" auto-indent="true"/>
<mvc:script-template-configurer engine-name="nashorn" render-function="render" content-type="text/plain"
charset="ISO-8859-1" resource-loader-path="classpath:" shared-engine="false">
<mvc:script location="org/springframework/web/servlet/view/script/nashorn/render.js"/>
</mvc:script-template-configurer>
</beans>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
</beans>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="handlerMapping" class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>
<bean id="godCtrl" name="/ /mypath/welcome.html /mypath/show.html /mypath/bookseats.html /mypath/reservation.html /mypath/payment.html /mypath/confirmation.html /mypath/test*"
class="java.lang.Object"/>
</beans>

View File

@@ -0,0 +1,7 @@
/welcome*=otherController
/welcome.html= mainController \n
/show.html=mainController
/bookseats.html=mainController
/reservation.html=mainController
/payment.html=mainController
/confirmation.html=mainController

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="defaultHandler"><ref bean="starController"/></property>
<property name="rootHandler"><ref bean="mainController"/></property>
<property name="useTrailingSlashMatch" value="true"/>
<property name="urlMap">
<map>
<entry key="/welcome*"><ref bean="otherController"/></entry>
<entry key="/welcome.html"><ref bean="mainController"/></entry>
<entry key="/show.html"><ref bean="mainController"/></entry>
<entry key="/bookseats.html"><ref bean="mainController"/></entry>
<entry key="/reservation.html"><ref bean="mainController"/></entry>
<entry key="/payment.html"><ref bean="mainController"/></entry>
<entry key="/confirmation.html"><ref bean="mainController"/></entry>
</map>
</property>
</bean>
<bean id="urlMappingWithProps" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="defaultHandler"><ref bean="starController"/></property>
<property name="rootHandler"><ref bean="mainController"/></property>
<property name="useTrailingSlashMatch" value="true"/>
<property name="mappings"><ref bean="propsForUrlMapping2"/></property>
</bean>
<bean id="propsForUrlMapping2" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location"><value>/org/springframework/web/servlet/handler/map2.properties</value></property>
</bean>
<bean id="mainController" class="java.lang.Object"/>
<bean id="otherController" class="java.lang.Object"/>
<bean id="starController" class="java.lang.Object"/>
</beans>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="defaultHandler"><ref bean="starController"/></property>
<property name="urlMap">
<map>
<entry key="/welcome.html"><ref bean="mainController"/></entry>
<entry key="/show.html"><ref bean="mainController"/></entry>
<entry key="/bookseats.html"><ref bean="mainController"/></entry>
<entry key="/reservation.html"><ref bean="mainControlle"/></entry>
<entry key="/payment.html"><ref bean="mainController"/></entry>
<entry key="/confirmation.html"><ref bean="mainController"/></entry>
</map>
</property>
</bean>
<bean id="urlMappingWithProps" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="defaultHandler"><ref bean="starController"/></property>
<property name="mappings"><ref bean="propsForUrlMapping2"/></property>
</bean>
<bean id="propsForUrlMapping2" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location"><value>/org/springframework/web/servlet/handler/map2.properties</value></property>
</bean>
<bean id="mainController" class="java.lang.Object"/>
<bean id="starController" class="java.lang.Object"/>
</beans>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlDecode"><value>true</value></property>
<property name="mappings">
<value>
welcome.html=mainController
/**/pathmatchingTest.html=mainController
/**/pathmatching??.html=mainController
/**/path??matching.html=mainController
/**/??path??matching.html=mainController
/**/*.jsp=mainController
/administrator/**/pathmatching.html=mainController
/administrator/**/testlast*=mainController
/administrator/another/bla.xml=mainController
/administrator/testing/longer/**/**/**/**/**=mainController
/administrator/testing/longer2/**/**/bla/**=mainController
/*test*.jpeg=mainController
/*/test.jpeg=mainController
/outofpattern*yeah=mainController
/anotherTest*=mainController
/stillAnotherTestYeah=mainController
/shortpattern/testing=mainController
/show123.html=mainController
/sho*=mainController
/bookseats.html=mainController
/reservation.html=mainController
/payment.html=mainController
/confirmation.html=mainController
/test%26t%20est/path%26m%20atching.html=mainController
*=starController
</value>
</property>
</bean>
<bean id="mainController" class="java.lang.Object"/>
<bean id="starController" class="java.lang.Object"/>
<bean id="anotherController" class="java.lang.Object"/>
</beans>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1 @@
h2 { color:white; }

View File

@@ -0,0 +1 @@
h2 { color:white; }

View File

@@ -0,0 +1,4 @@
THIS DOES NOT START WITH "CACHE MANIFEST"
CACHE:
bar.css

View File

@@ -0,0 +1,3 @@
@import url("http://example.org/fonts/css");
body { background: url("file:///home/spring/image.png") }
figure { background: url("//example.org/style.css")}

View File

@@ -0,0 +1 @@
h1 { color:red; }

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Foo</title>
</head>
<body>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

View File

@@ -0,0 +1 @@
function foo() { console.log("hello bar"); }

View File

@@ -0,0 +1 @@
function foo() { console.log("hello world"); }

View File

@@ -0,0 +1,9 @@
@import url("bar.css");
@import url('bar.css');
@import url(bar.css);
@import "foo.css";
@import 'foo.css';
body { background: url("images/image.png") }

View File

@@ -0,0 +1,17 @@
CACHE MANIFEST
# this is a comment
CACHE:
bar.css
foo.css
//example.org/style.css
NETWORK:
*
CACHE:
js/bar.js
http://example.org/image.png
FALLBACK:
/main /static.html

View File

@@ -0,0 +1 @@
function foo() { console.log("hello world"); }

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<definition name="base.definition"
template="/WEB-INF/jsp/layout.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
</definition>
<definition name="contact" extends="base.definition">
<put-attribute name="title" value="Contact Manager" />
<put-attribute name="body" value="/WEB-INF/jsp/contact.jsp" />
</definition>
</tiles-definitions>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<definition name="base.definition"
template="/WEB-INF/jsp/layout.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
</definition>
<definition name="contact" extends="base.definition">
<put-attribute name="title" value="Contact Manager" />
<put-attribute name="body" value="/WEB-INF/jsp/contact.jsp" />
</definition>
</tiles-definitions>

View File

@@ -0,0 +1,94 @@
<#--
test template for FreeMarker macro test class
-->
<#import "spring.ftl" as spring />
NAME
${command.name}
AGE
${command.age}
MESSAGE
<@spring.message "hello"/> <@spring.message "world"/>
DEFAULTMESSAGE
<@spring.messageText "no.such.code", "hi"/> <@spring.messageText "no.such.code", "planet"/>
MESSAGEARGS
<@spring.messageArgs "hello", msgArgs/>
MESSAGEARGSWITHDEFAULTMESSAGE
<@spring.messageArgsText "no.such.code", msgArgs, "Hi"/>
THEME
<@spring.theme "hello"/> <@spring.theme "world"/>
DEFAULTTHEME
<@spring.themeText "no.such.code", "hi!"/> <@spring.themeText "no.such.code", "planet!"/>
THEMEARGS
<@spring.themeArgs "hello", msgArgs/>
THEMEARGSWITHDEFAULTMESSAGE
<@spring.themeArgsText "no.such.code", msgArgs, "Hi!"/>
URL
<@spring.url "/aftercontext.html"/>
URLPARAMS
<@spring.url relativeUrl="/aftercontext/{foo}?spam={spam}" foo="bar" spam="bucket"/>
FORM1
<@spring.formInput "command.name", ""/>
FORM2
<@spring.formInput "command.name", 'class="myCssClass"'/>
FORM3
<@spring.formTextarea "command.name", ""/>
FORM4
<@spring.formTextarea "command.name", "rows=10 cols=30"/>
FORM5
<@spring.formSingleSelect "command.name", nameOptionMap, ""/>
FORM6
<@spring.formMultiSelect "command.spouses", nameOptionMap, ""/>
FORM7
<@spring.formRadioButtons "command.name", nameOptionMap, " ", ""/>
FORM8
<@spring.formCheckboxes "command.stringArray", nameOptionMap, " ", ""/>
FORM9
<@spring.formPasswordInput "command.name", ""/>
FORM10
<@spring.formHiddenInput "command.name", ""/>
FORM11
<@spring.formInput "command.name", "", "text"/>
FORM12
<@spring.formInput "command.name", "", "hidden"/>
FORM13
<@spring.formInput "command.name", "", "password"/>
FORM14
<@spring.formSingleSelect "command.name", options, ""/>
FORM15
<@spring.formCheckbox "command.name"/>
FORM16
<@spring.formCheckbox "command.jedi"/>
FORM17
<@spring.formInput "command.spouses[0].name", ""/>
FORM18
<@spring.formCheckbox "command.spouses[0].jedi" />

View File

@@ -0,0 +1,3 @@
layout 'layout-main.tpl',
title: 'Layout example',
bodyContents: contents { p('This is the body') }

View File

@@ -0,0 +1 @@
p('Hello Spring')

View File

@@ -0,0 +1,2 @@
include template: 'includes/include.tpl'
p('Hallo Spring')

View File

@@ -0,0 +1,2 @@
include template: 'includes/include.tpl'
p('Hola Spring')

View File

@@ -0,0 +1 @@
p('Bonjour Spring')

View File

@@ -0,0 +1 @@
p('Include Default')

Some files were not shown because too many files have changed in this diff Show More