我用过的一些web.xml配置
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
encodingFilter針對(duì)request的內(nèi)容進(jìn)行編碼
?
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>flushMode</param-name>
<param-value>AUTO</param-value>
</init-param>
</filter>
待續(xù)…..
?
<listener>
<listener-class>com.hello.common.web.EnviromentInitContextListener</listener-class>
</listener>
com.hello.common.web.EnviromentInitContextListener這個(gè)listener?implements ServletContextListener
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
org.springframework.web.context.ContextLoaderListener也是implements ServletContextListener
可見,裝著Listener的都應(yīng)該是list。
轉(zhuǎn)載于:https://my.oschina.net/u/937710/blog/146063
總結(jié)
以上是生活随笔為你收集整理的我用过的一些web.xml配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: xhost配置
- 下一篇: JavaScript--在页面的下拉框控