<html:errors> question

I have a JSP file,and I use <html:errors> in this page,but it raise error,my code is follows:

<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="html" %>

<html>

<head>

<link rel="stylesheet" href="style.css" type="text/css">

</head>

<html:errors/>

<html:form method="post" action="log.do">

<html:text property="abc" /><html:errors property="abc"/>

</html:form>

and my Form is follows:

......

public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){

ActionErrors errors =new ActionErrors();

if(abc!=null && abc.length()>0){

errors.add("abc",new ActionError(" error.abc.required"));

}

return errors;

}

When I run it,it raise following error:

org.apache.jasper.JasperException: /index.jsp(8,15) Attribute property invalid for tag errors according to TLD

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java :802)

org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2149)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java :510)

javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I have looked up <html:errors> API,I find it have property attribute:

property Name of the property for which error messages should be displayed. If not specified, all error messages (regardless of property) are displayed. (RT EXPR)

Why raise above error when I use <html:errors property="abc"/> ? How to do with it?

Thanks in advance!

[2718 byte] By [EdwardKinga] at [2007-10-2 13:07:30]
# 1

Maybe this piece of code might help you

<tr>

<td align="center"><logic:messagesPresent>

<html:messages id="error">

<span id="error"><li><%=error%></li></span>

</html:messages>

</logic:messagesPresent>

<span id="error"><c:out value="${errorsNolog}"/></span>

</td>

</tr>

jgalacambraa at 2007-7-13 10:32:38 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...