找回密码
 注册
查看: 1924|回复: 0

Myeclipse 自定义标签问题

[复制链接]
发表于 2007-1-27 11:46:22 | 显示全部楼层 |阅读模式
------------------------------web.xml--------------------------------
?xml version="1.0" encoding="UTF-8"?>
web-app version="2.4"
        xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

  jsp-config>
  taglib>
      taglib-uri>LeftMenu /taglib-uri>
      taglib-location>/WEB-INF/LeftMenu.tld /taglib-location>
  /taglib>
  jsp-property-group>
        description>Special property group for JSP Configuration JSP example./description>
        display-name>LeftMenu /display-name>
        url-pattern>/* /url-pattern>
        el-ignored>false /el-ignored>
        page-encoding>GBK /page-encoding>
        scripting-invalid>true /scripting-invalid>
  /jsp-property-group>
  
  /jsp-config>
  

--------------------------------------tld--------------------------------------
?xml version="1.0" encoding="ISO-8859-1"?>

taglib xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
    version="2.0">
        tlib-version>1.1 /tlib-version>
        short-name>LM /short-name>

        tag>
                name>LeftMenuTag /name>
                tag-class>bizi.biziBeanSource.info.LeftMenu /tag-class>
        /tag>

/taglib>

/web-app>


-------------------------------------jsp--------------------------------
%@ page contentType="text/html; charset=GBK" %>
%@ page language="java" import="java.util.*" %>
%@ taglib uri="http://java.sun.com/jsp/jstl/core/LeftMenu" prefix="LM" %>

%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

  LM:LeftMenuTag>
  /LM:LeftMenuTag>  
  body>
    This is my JSP page. br>
  /body>



web.xml不报错了
LeftMenu.tld在编译前在这个结尾标计 /tag>报的错
cvc-complex-type.2.4.b The content of element tag is not complete .
One of '{"http://java.sun.com/xml/ns/j2ee":tei - class, "http://java.sun.com/xml/ns/j2ee":body-content}'is expected.
这个错误,请问tld 在eclipse 3.0 myeclipse 3.8 Jdk1.5中如何解决这个问题
是用什么版本才对
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-6 06:58 , Processed in 0.020719 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表