无法解析pageContext.request.contextPath 造成乱码 是因为 web.xml文件的版本过低
把pageContext.request.contextPath当成字符串了
2.3以后的版本才可以使用el表达式
所以改一下xml文件版本就好了
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">