Thank you very much.

JSP file:
<%...@taglib prefix="s" uri="/struts-tags" %>
<%...@taglib prefix="lab" uri="/lab" %>
<html>
<head>
<title>Hello World</title>
<s:head />
</head>
<body>
    <lab:hello name="Hello_in_Value"  theme="simple"/>
</body>
</html>


TLD file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN"
        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";>
<taglib>
    <tlib-version>2.2.3</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>lab</short-name>
    <uri>/lab</uri>
    <display-name>"Lab Tags"</display-name>
    <description><![CDATA["lab"]]></description>
    <tag>
        <name>hello</name>
        <tag-class>lab.struts2.taglib.HelloTag</tag-class>
        <body-content>JSP</body-content>
        <description><![CDATA[Render a hello]]></description>
        <attribute>
            <name>id</name>
            <required>false</required>
            <rtexprvalue>false</rtexprvalue>
            <description>
                <![CDATA[id for referencing element]]></description>
        </attribute>
        <attribute>
            <name>name</name>
            <required>true</required>
            <rtexprvalue>false</rtexprvalue>
            <description><![CDATA[ Name]]></description>
        </attribute>
    </tag>
</taglib>



Regards,
Mead


On Sat, Oct 9, 2010 at 9:31 PM, Li Ying <liying.cn.2...@gmail.com> wrote:

> Hi Lai:
>
> The error message looks like the value of the attribute [theme] (in
> your jsp) is invalid.
>
> Can you show us your jsp and TLD file?
>
>
>
> 2010/10/9 Mead Lai <laiqi...@gmail.com>:
> > I read the attribute "name" in the template, the Exception log:
> >
> > Attribute theme invalid for tag hello according to TLD
> >
>  
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
> >
>  org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> >
>  org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
> >
>  
> org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1235)
> >
> >
> >
> > Regards,
> > Mead
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to