Cannot call sendError() after the response has been committed(filter问题)

就是因为执行了filter的dofilter方法中 chain.doFilter(request,response)了

执行了两遍

if(){}else{chain.doFilter(request,response);}即可

原文地址:https://www.cnblogs.com/austinspark-jessylu/p/6476312.html