我有一個很大的問題來實現我的JSP頁面。不能用新的類路徑實現JSTL
我在理論上使用Spring 4與STS(Eclipse Luna)中的JSTL 1.2 + Servlet 3.0 - Tomcat 7. I saw the article posted here,但是我解決不了。
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
此URL由STS IDE(Eclipse)識別。然而,當我嘗試打開該頁面顯示錯誤:
/views/root/index.jsp(1,63) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
的src /主/ web應用/ WEB-INF/web.xml中
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<view-state id="start">
</view-state>
</flow>
的src /主/ web應用/ WEB-INF/lib目錄
- javax.servlet.jsp.jstl-1.2.1.jar
- javax.servlet.jsp.jstl-API-1.2.1.jar
用另一種方法嘗試:
<%@ taglib prefix="c" uri="http://xmlns.jcp.org/jsp/jstl/core" %>
此網址不能由Eclipse IDE的認可。指責項目中的錯誤。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core">
正如一些庫放在誰在pom.xml的(Maven的),在該行的網址是公認的,但什麼也沒有發生在瀏覽器中。
PS:所有四個項目的Spring都表示,他們不再需要文件「web.xml」,並嘗試放置一些教程,再次指責eclipse錯誤。