在jboss-tomcat里运用tld时出了问题...
目录结构如下:
test.war/web-inf/tlds/test.tld
test.war/web-inf/web.xml
test.war/index.jsp
test.war/web-inf/classes/test/test.class
编译index.jsp出现错误:The requested resource (/db/index.jsp) is not available.
请问出了什么问题?怎么修改?
web.xml内容:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<taglib>
<taglib-uri>/WEB-INF/tlds/test.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/test.tld</taglib-location>
</taglib>
</web-app>
test.tld:
<?xml version="1.0" encoding="gb2312" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<!-- a tag library descriptor -->
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>login</shortname>
<uri></uri>
<info>info</info>
<tag>
<name>login</name>
<tagclass>test.test</tagclass>
<attribute>
<name>height</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>width</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
index.jsp:
<%@ taglib uri="/WEB-INF/tlds/test.tld" prefix="sb" %>
<html>
<head>
<title>Hello</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<sb:test width="200" height="300"></sb:login>
</body>
</html>
问题点数:0、回复次数:6Top
1 楼bruni(不如你)回复于 2003-08-02 19:45:59 得分 0
(/db/index.jsp)
you web app's context is /test, not /db.Top
2 楼yakeman(奇怪)回复于 2003-08-02 21:53:19 得分 0
写错了,
编译index.jsp出现错误:The requested resource (/test/index.jsp) is not availableTop
3 楼9731boy(叉叉TV - 班头爷)回复于 2003-08-02 22:04:33 得分 0
大小写?...WEB-INFTop
4 楼yakeman(奇怪)回复于 2003-08-03 10:38:22 得分 0
现在可以显示了,但是结果是:null300,width的数据显示不出来.....Top
5 楼yakeman(奇怪)回复于 2003-08-04 09:59:45 得分 0
upTop
6 楼yakeman(奇怪)回复于 2003-08-27 14:29:12 得分 0
upTop




