在开启maven项目的时候,jsp之间跳转,浏览器地址url出现了这样的乱码:
http://localhost:8080/xiaomishopping/$%7BpageContext.request.contextPath%7D/cartservlet?method=getCart
原因:就是web.xml里面的version版本太低了 web.xml里替换成这个就OK了
<?xml version="1.0" encoding="UTF-8"?>
<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_4_0.xsd"
version="4.0">
</web-app>