Web4.0中web.xml头信息

Web4.0:

<?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>


  PS:之所以放上一个Web4.0版本的开头,实则是遇到了一个奇怪的BUG。在SpringMVC中JSP页面通过${message}始终无法获取这个变量在Controller传递过来的值。找了很久,偶然发现问题在于web.xml文件中声明的Web2.3不支持如上的变量引用,所以就创建了Web4.0的项目,将其开头声明替换成Web4.0的就解决了。把web.xml中的开头放出来,以备日后使用。

猜你喜欢

转载自blog.csdn.net/qq_32483145/article/details/80301537