请问楼上的,out在taglib.tld应该怎么样设置呢?另外,我在java.sun.com里面找到的资料说:“When you use an absolute URI, you do not have to add the taglib element to web.xml; the JSP container automatically locates the TLD inside the JSTL library ” 这里说是不用在web.xml里面做设置的啊
我是说检查一下你的taglib.tld,是否有这么一个tld文件,在查一下其中是否有out的定义, 比如下面(我自己做的一部分): <?xml version="1.0" encoding="ISO-8859-1"?> <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by dsx (s) --> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <!-- a tag library descriptor --> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version> <short-name>portal</short-name> <uri/> <description> A tag library for portal page </description> <tag> <name>tile</name><!--大概tile这样的一个位置--> <tag-class>testportalversion1_0.Tile</tag-class> <tei-class>testportalversion1_0.TileTagExtraInfo</tei-class> <body-content>JSP</body-content> <attribute> <name>title</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> </taglib> 要不就把你的taglib.tld贴出来看看
<taglib-uri>
http://java.sun.com/jstl/core
</taglib-uri>
对应即可,所以说这一步应该没有什么问题,按照你的思路,参考你的web.xml
<taglib-location>
/WEB-INF/taglib.tld
</taglib-location>
你的taglib应该是/WEB-INF下的taglib.tld,即你的out标签应该在此taglib.tld中。看看试不是者的错误。
这里说是不用在web.xml里面做设置的啊
比如下面(我自己做的一部分):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by dsx (s) -->
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<!-- a tag library descriptor -->
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>portal</short-name>
<uri/>
<description>
A tag library for portal page
</description>
<tag>
<name>tile</name><!--大概tile这样的一个位置-->
<tag-class>testportalversion1_0.Tile</tag-class>
<tei-class>testportalversion1_0.TileTagExtraInfo</tei-class>
<body-content>JSP</body-content>
<attribute>
<name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
要不就把你的taglib.tld贴出来看看
说得很详细啊。 将“流氓无赖”测试到底
——始于2003年7月
树欲止而风不停,行云流水匆匆去;
树梢蚂蚱凭空望,江边浪花碎巨石; 支持“流金岁月”!!!
发送框,少个“右键菜单,选择粘贴”;
——2003年12月24日am^@^