打包的jar文件怎么说找不到?

wafeng 2004-05-06 11:44:15
我将一些自定义的标签打包放在java_home/bin目录下,uri用得是exampleURI,但在jsp里调用的时候报错如下:File "/exampleURI" not found
我确信源代码都没有问题,因为未打包时能正常显示,jsp如下:
<%@taglib prefix="example" uri="exampleURI" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<example:createArray name="theArray"/>
we are now using jar file<br>
the array has <%= theArray.length %> items.
</body>
</html>
tld文件如下:
<?xml version="1.0" encoding="ISO-8859-1"?>
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.4</jsp-version>
<short-name>ExampleTags</short-name>
<uri>exampleURI</uri>
<description>a set of example tag handlers.</description>
<tag>
<name>time</name>
<tag-class>com.wrox.ch10.timeTag</tag-class>
<attribute>
<name>format</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>iterate</name>
<tag-class>com.wrox.ch10.iterateTag</tag-class>
<variable>
<name-given>currentString</name-given>
<variable-class>java.lang.String</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
</variable>
<variable>
<name-given>arrayCount</name-given>
<variable-class>java.lang.Integer</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
</variable>
</tag>
<tag>
<name>createArray</name>
<tag-class>com.wrox.ch10.createArrayTag</tag-class>
<tei-class>com.wrox.ch10.arrayExtraInfo</tei-class>
<attribute>
<name>name</name>
</attribute>
</tag>
</taglib>
...全文
68 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wafeng 2004-05-11
  • 打赏
  • 举报
回复
up
wafeng 2004-05-09
  • 打赏
  • 举报
回复
为什么要放在web-inf/lib下面呢,我可是照书一模一样打上去的
askr 2004-05-09
  • 打赏
  • 举报
回复
up
北极猩猩 2004-05-08
  • 打赏
  • 举报
回复
应该放在WEB-INF/lib目录之下
wafeng 2004-05-08
  • 打赏
  • 举报
回复
谁知道呀
qdcomn 2004-05-08
  • 打赏
  • 举报
回复
对,注意路径问题
wafeng 2004-05-07
  • 打赏
  • 举报
回复
同志们,你们没遇到过吗?

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧