jbuilder2005
weblogic8.1
web.xml中:
<taglib>
<taglib-uri> http://java.sun.com/jstl/functions </taglib-uri>
<taglib-location> /WEB-INF/fn.tld </taglib-location>
</taglib>
fn.tld也复制到web-inf目录下了
jsp页面中:
<%@taglib uri= "/WEB-INF/fn.tld " prefix= "fn "%>
jbuilder报错:
<2007-4-21 下午10时06分54秒 CST> <Warning> <HTTP> <BEA-101248> <[E:\testStruts\testStruts\webApp]: Deployment descriptor "/WEB-INF/fn.tld " is malformed. Check against the DTD: cvc-elt.1: Cannot find the declaration of element 'taglib '. (line 6, column 17).>
Errors encountered while compiling 'E:/testStruts/testStruts/webApp ' :
Translation of /page.jsp failed: (line 7): Error in using tag library uri= '/WEB-INF/fn.tld ' prefix= 'fn ': Tag Library Descriptor contains no Tag descriptions
请问各位 该怎么办?
------解决方案--------------------
web.xml定义的版本是多少,如果是2.4或2.5的, <taglib> 标签要写到 <jsp-config> 之内,
或者不用写,直接在页面用 <%@ taglib uri= "http://java.sun.com/jstl/functions " prefix= "fn " %>
如果你的web.xml是2.3或以前的版本,那你要查一查看看是不是路径的问题了~
------解决方案--------------------
小朋友,你搞错了吧!
如果你在web.xml文件中声明了taglib的位置,页面上就该这样引用:
web.xml中:
<taglib>
<taglib-uri> http://java.sun.com/jstl/functions </taglib-uri>
<taglib-location> /WEB-INF/fn.tld </taglib-location>
</taglib>
fn.tld也复制到web-inf目录下了
jsp页面中:
<%@taglib urihttp://java.sun.com/jstl/functions " prefix= "fn "%>
===================================
如果想直接应用,就不要再web.xml中声明了,知道不!