解决not create session after the response commited的问题(在过滤器中)

版权声明:@渔闻520 https://blog.csdn.net/weixin_41060905/article/details/82763976

在做登录防止用户没有登录而访问其他web资源的时候,写了一个过滤器,却跳出not create session after the response commited,经检测,是写了多余的chain.doFilter(request,response);

即写了两次的chain.doFilter(request,response)

这样的话,会在一次的session中访问两次的jsp,第一次访问已近结束,却要再创建session,这样就会报错。

解决是删除一个就可以。

猜你喜欢

转载自blog.csdn.net/weixin_41060905/article/details/82763976
今日推荐