使用shiro的session后,HttpSession.getServletContext() 获取一直是null的解决方法
2016-01-06 17:20
357 查看
web.xml
<!-- Shiro配置 -->
<filter>
<filter-name>shiroFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>shiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Shiro配置 -->
<filter>
<filter-name>shiroFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>shiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
相关文章推荐
- 网络编程基础
- HTTP 错误 500.19 - Internal Server Error
- [转]其实你不懂wget的心 http://www.cnblogs.com/cbscan/articles/2276817.html
- redhat5在VM下无法连接网络--host-only类型
- 配置基于http的yum源
- 企业使用网络电话,节约通话成本
- VirtualBox Host-Only CentOS7 Mac Windows vboxnet0 网络共享
- Python中http请求方法库汇总
- 随手记之TCP Keepalive笔记
- 网络 tcp连接中的socket 端口 / tcp 数据包数据查看
- Forward a TCP port to another IP or port using NAT with Iptables
- 详解Nginx中HTTP的keepalive相关配置
- TDSTCPServerTransport 的Filters
- 2015合肥网络赛 HDU 5489 Removed Interval LIS+线段树(树状数组)
- 2015合肥网络赛 HDU 5492 Find a path 动归
- 2015上海网络赛 HDU 5478 Can you find it 数学
- 2015上海网络赛 HDU 5475 An easy problem 线段树
- 2015北京网络赛 D-The Celebration of Rabbits 动归+FWT
- 2015北京网络赛 J Scores bitset+分块
- 2015北京网络赛 G Boxes BFS+打表