本文主要是介绍[SpringMVC] 今日最坑,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
折腾了一晚上,在将一个Eclipse项目转移到IDEA中时,发现<c:if>
标签始终不起作用,到最后才发现问题出在了web.xml
文件中,IDEA默认创建的web.xml
文件是这样的:
<web-app><display-name>Archetype Created Web Application</display-name>
</web-app>
这样将SpringMVC的环境搭建好后,<c:if>
标签不起作用,最后发现如下就可以了:
<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"><display-name>Archetype Created Web Application</display-name>
</web-app>
这篇关于[SpringMVC] 今日最坑的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!