自定义标签taglib uri提示错误

D624987420 2011-10-28 08:00:32
jsp 文件
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>(有问题
<%@ taglib uri="http://www.jspcentral.com/tags" prefix="xf"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<center><font color="#0000FF">
<xf:hello/>
</font></center>
</body>
</html>
web。xml文件
<web-app>

<taglib >
<taglib-uri>http://www.jspcentral.com/tags</taglib-uri>
<taglib-location>/WEB-INF/tags/demo.tld</taglib-location>
</taglib>

</web-app>
dome。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.2</jspversion>

<tag>
<name>hello</name>
<tagclass>scr.unit16.HelloTag</tagclass>
</tag>

<tag>
<name>time</name>
<tagclass>scr.unit16.TimeTag</tagclass>
</tag>

</taglib>



问题 在jsp文件中netbeans编译器为什么提示 taglib的uri路径 The absolute uri:" http://www.jspcentral.com/tags"cannot be resolved in either web.xml or the jar files deployed with this application 这样的错误??

请高手大侠帮忙!!!
...全文
502 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
sssschenyi 2011-10-29
  • 打赏
  • 举报
回复
jsp啊,太高深了。
yueluo5520 2011-10-29
  • 打赏
  • 举报
回复
把你web.xml中的<taglib-uri>里的内容改下试试,比如我的自定义标签配置是
JSP:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


web.xml:

<taglib>
<taglib-uri>jsp/jstl/c.tld</taglib-uri>
taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
叫我梁大侠 2011-10-29
  • 打赏
  • 举报
回复
去JSP问问吧~~

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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