我第一次使用java服務器頁面,並且遇到標籤問題。如果這是相關的,我也在Eclipse中工作。無標籤「選擇」標籤庫中定義的前綴爲「c」
我得到特定的錯誤是:
org.apache.jasper.JasperException: /Query.jsp (line: 5, column: 0) No tag "choose" defined in tag library imported with prefix "c"
的問題是,有是標籤「選擇」與前綴ç...
我是有麻煩通常推薦的網址,似乎其中一些已過時,所以我下載了標準標籤並將其提取到我的WEB-INF/tags目錄中。
我的JSP文件開始時用:
<%@ page contentType="text/html" import="beans.*" %>
<%@ taglib prefix="c" tagdir="/WEB-INF/tags/c.tld" %>
<%@ taglib prefix="sql" tagdir="/WEB-INF/tags/sql.tld" %>
<%@ taglib prefix="fn" tagdir="/WEB-INF/tags/fn.tld" %>
<c:choose>
....
c.tld有:
...
<tag>
<description>
Simple conditional tag that establishes a context for
mutually exclusive conditional operations, marked by
<when> and <otherwise>
</description>
<name>choose</name>
<tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
<body-content>JSP</body-content>
</tag>
這是我的猜測,有某種配置錯誤的地方,但我完全無能哪裏有可能。
請將鼠標放在問題下方的[[jstl]'標籤上方,直到彈出一個框,然後單擊其中的* info *鏈接。 – BalusC