lmp4h7 发表于 2007-1-27 11:46:22

Myeclipse 自定义标签问题

------------------------------web.xml--------------------------------
?xml version="1.0" encoding="UTF-8"?>
web-app version="2.4"
        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
        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"
    xmlns:xsi="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中如何解决这个问题
是用什么版本才对
页: [1]
查看完整版本: Myeclipse 自定义标签问题