雨路IT
当前位置:首页 » it资讯

taglib使用求助

八月 23rd, 2007 by admin



我做了一个很简单的taglib的应用,却报错!  
  在jsp1.jsp文件中加入:  
  <%@   taglib   uri="/web-inf/tag/tag1.tld"   prefix="tag1"%>  
  在对应tag1.tld的内容为:  
  <?xml   version="1.0"   encoding="gb2312"?>  
  <!--taglib.dtd是从sun下载的文件-->  
  <!doctype   taglib   public   uri="taglib.dtd"   >  
  <taglib>  
    <tlibversion>1.0</tlibversion>  
    <jspversion>1.1</jspversion>  
    <tag>  
      <name>getvalue</name>  
      <tagclass>utils.tag.tag1</tagclass>  
      <bodycontent>empty</bodycontent>  
      <attribute>  
        <name>namevalue</name>  
        <required>true</required>  
      </attribute>  
    </tag>  
  </taglib>  
  在tomcat环境中运行jsp1.jsp报错信息如下:  
  org.apache.jasper.jasperexception:   xml   parsing   error   on   file   /web-inf/tag/tag1.tld:   (line   2,   col   -1):   期望已引用的public   标识符值。  
    at   org.apache.jasper.xmlparser.parserutils.parsexmldocument(parserutils.java:189)  
    at   org.apache.jasper.compiler.taglibraryinfoimpl.parsetld(taglibraryinfoimpl.java:247)  
    at   org.apache.jasper.compiler.taglibraryinfoimpl.(taglibraryinfoimpl.java:183)  
  我的运行环境是:jdk1.4+tomcat4.1,怎么回事呢?  
 

.

参考文章:

  • 苹果起诉哈佛学生泄密 律师称其为言论自由
  • 再论V66
  • e-Commerce 的安全性:攻击…
  • WebSphere Application Server 中的内存泄漏检测与分析: 第 1 部分:内存泄漏概述
  • 人工智能 Java 坦克机器人系列: 神经网络,上部
  • 法律服务热线:律师走到你身边
  • 迪比特6228 vs 西门子M55 简单对比
  • 人工智能 Java 坦克机器人系列: 神经网络,下部
  • Rich Internet Applications 的技术选项
  • 专家评论: Roland Barcia:Java Persistence API 中带注释的命名查询是否真的非常有用…
  • 网友回答:

    Posted in noname. Edit

    发表评论