需要有关dispatcher servlet xml文件的帮助吗
我正在尝试这个dispather servlet xml文件需要有关dispatcher servlet xml文件的帮助吗,xml,spring,servlets,spring-mvc,Xml,Spring,Servlets,Spring Mvc,我正在尝试这个dispather servlet xml文件 <?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.springframewo
<?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-2.5.xsd"
xmlns:p="http://www.springframework.org/schema/p">
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref local="localeChangeInterceptor"/>
</list>
</property>
<property name="urlMap">
<map>
<entry key="/hello.html">
<ref bean="helloController"/>
</entry>
</map>
</property>
</bean>
<bean id="helloController" class="net.roseindia.web.HelloWorldController"></bean>
<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="hl"/>
</bean>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/>
</beans>
弹簧参考中描述了这些部件的功能,请参阅
确定用户的区域设置LocaleResolver
允许用户手动更改其区域设置LocaleChangeInterceptor
<property name="interceptors">
<list>
<ref local="localeChangeInterceptor"/>
</list>
</property>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/>