解决方案:
在web.xml中的 webapp里加入以下命名空间
<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">
原因:
某些情况生成的web.xml的webapp缺少这些命名空间,导致${}无法读取