我需要在我的.jsp文件中使用jstl。
我已經完成了這些先決條件步驟,並且我沒有任何結果:
1-我認爲適合我的版本是jstl-1.2.jar
。我下載並把它放在共同的地方,並建議目錄\WebContent\WEB-INF\lib
並在jsp文件中使用<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
。
結果:我在源代碼中看到這個錯誤
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
2-我添加了jar文件到項目構建路徑。
結果:步驟1的錯誤解決了,但運行後我看到了這個錯誤:org.apache.jasper.JasperException: 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
。
3我把\apache-tomcat-7.0.77\webapps\ROOT\WEB-INF
和\apache-tomcat-7.0.77\lib
中的jar文件。
結果:任何改變。
4-我也下載了jstl-api-1.2.jar
和jstl-impl-1.2.jar
,我也爲他們做了第1步到第3步。
結果:任何改變。
5我也在環境變量中設置classpath。
結果:任何改變。
6-我已經完成並取消了上述步驟的任何組合。
結果:任何改變。
我使用這些工具:不能在jsp中使用jstl
Windows 7, eclipse IDE, Apache Tomcat/7.0.77, Servlet Version: 3.0, JSP Version: 2.2
我GOOGLE並學習相關的計算器職位和答案,但我已經得到了沒有結果。我是jsp的初學者。任何想法?