访问项目http://localhost:8080/disk/opServlet.shtml?path=D:\时报错
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986。
解决方法:在tomcat安装目录D:\soft\tomcat8yes\conf\server.xml中添加
我的报错原因是路径中有特殊字符:\ 所以就加了relaxedQueryChars="[:\ ]"。
如果是其他特殊字符那改成相应的应该就可以了,emmm应该是吧。
记录一下,怕自己忘了,啥也记不住,我太难了