使用IDEA建立maven项目骨架是webapp时,软件自动建立的web.xml文件是2.3版本的,不能使用el表达式,因此能够手动换成4.0的文件头。java
<?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>