求助!!
=================================
环境:
在Weblogic8.1 + Eclipse3.0 + 局域网与internet完全隔离的,下建立自定义标签
=================================
内容:
mytag.tld内容
<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
version="2.0">
<description>xmddl 1.1 hello library</description>
<display-name>xmddl hello</display-name>
<tlib-version>1.1</tlib-version>
<short-name>hello</short-name>
<uri>http://www.xmddl.com/tag</uri>
<tag>
<description>我的Hello World</description>
<name>hello_int</name>
<tag-class>HelloTag_Interface</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
web.xml内容:
<taglib>
<taglib-uri>mytag</taglib-uri>
<taglib-location>/WEB-INF/tlds/mytag.tld</taglib-location>
</taglib>
hello.jsp内容
<%@ taglib uri="mytag" prefix="hello" %>
<hello:hello_int/>
=================================
错误:
启动服务器提示错误如下:
"/WEB-INF/tlds/mytag.tld" でタグ ライブラリ記述子を解析中にエラーが発生しました。
("/WEB-INF/tlds/mytag.tld" 发生数据记录解析错误)
运行JSP文件提示错误如下:
"/WEB-INF/tlds/mytag.tld"不正确。DTD cvc-elt.1: Cannot find the declaration of element 'taglib'. (5行、17列)
weblogic.servlet.jsp.JspException: (line -1): cannot load TLD: weblogic.xml.dom.ChildCountException: missing child tagclass in tag
at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:328)
at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
......
请大家帮忙,谢谢,我已经找了两天了,还不知道应该怎么解决问题。
=================================
环境:
在Weblogic8.1 + Eclipse3.0 + 局域网与internet完全隔离的,下建立自定义标签
=================================
内容:
mytag.tld内容
<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
version="2.0">
<description>xmddl 1.1 hello library</description>
<display-name>xmddl hello</display-name>
<tlib-version>1.1</tlib-version>
<short-name>hello</short-name>
<uri>http://www.xmddl.com/tag</uri>
<tag>
<description>我的Hello World</description>
<name>hello_int</name>
<tag-class>HelloTag_Interface</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
web.xml内容:
<taglib>
<taglib-uri>mytag</taglib-uri>
<taglib-location>/WEB-INF/tlds/mytag.tld</taglib-location>
</taglib>
hello.jsp内容
<%@ taglib uri="mytag" prefix="hello" %>
<hello:hello_int/>
=================================
错误:
启动服务器提示错误如下:
"/WEB-INF/tlds/mytag.tld" でタグ ライブラリ記述子を解析中にエラーが発生しました。
("/WEB-INF/tlds/mytag.tld" 发生数据记录解析错误)
运行JSP文件提示错误如下:
"/WEB-INF/tlds/mytag.tld"不正确。DTD cvc-elt.1: Cannot find the declaration of element 'taglib'. (5行、17列)
weblogic.servlet.jsp.JspException: (line -1): cannot load TLD: weblogic.xml.dom.ChildCountException: missing child tagclass in tag
at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:328)
at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
......
请大家帮忙,谢谢,我已经找了两天了,还不知道应该怎么解决问题。
解决方案 »
- Java Web部署问题
- 简单的jsp中文乱码,查了很多文章,还是不行啊
- 求救,在线急等 如何在jsp页面中获取表单的值 即有一个buttom连接 点击时将表单某一项的值作为参数凡在连接之后
- 请各位大虾帮帮小弟关于 ThreadLocal 存值的问题
- request.getContentType()有什么用
- 一个小问题,请大家帮忙看看(谢谢)
- 在 线紧急 求救 !
- tomcat 4.1为什么会自动死掉?
- 谁有servlet.jar啊??? 借我一用,十分感谢!:)
- birt生成Excel缺失一部分数据
- java中list输出的值是由类名和 标记符“@”和此对象哈希代码的无符号十六进制表示组成
- jsp如何加载javaBeans
上面的办法不行
<hello:hello_int/>
==========================
<%@ taglib uri="http://www.xmddl.com/tag" prefix="hello" %>
<hello:hello_int/>
此处直接引用mytag.tld中定义的<taglib>中的uri不行的,好像只有xml3.0以上的不用写web.xml里
==========================
和xml文件没关系,JSP1.2和JSP2.0的容器均会自动到WEB-INF及META-INF目录下去找.tld文件
<2007/04/24 15時04分40秒 CST> <Warning> <HTTP> <BEA-101248> <[ServletContext(id=2829560,name=Sample,context-path=/Sample)]: デプロイメント記述子 "/WEB-INF/tlds/mytag.tld" は正しくありません。DTD cvc-elt.1: Cannot find the declaration of element 'taglib'. (行 5、カラム 17) を確認してください。>大概含义:
<2007/04/24 15時04分40秒 CST> <Warning> <HTTP> <BEA-101248> <[ServletContext(id=2829560,name=Sample,context-path=/Sample)]: 配置记录 "/WEB-INF/tlds/mytag.tld" 是不正确的。DTD cvc-elt.1: Cannot find the declaration of element 'taglib'. (行 5、列 17) 请确认。>请大家继续帮忙
提示错误如下:
<2007/04/24 15时29分06秒 CST> <Warning> <HTTP> <BEA-101248> <[Sample.war]: 配置文件"web.xml" 不正确 DTD org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'. (行 1列 10) >
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
.....
<2007/04/24 15時04分40秒 CST> <Warning> <HTTP> <BEA-101248> <[ServletContext(id=2829560,name=Sample,context-path=/Sample)]: "/WEB-INF/tlds/mytag.tld" 错误。DTD cvc-elt.1: Cannot find the declaration of element 'taglib'. (行 5、列 17) 。>
你把你的web.xml文件贴出来看看.