[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>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章