<logic:messagesPresent>
<table align="center" border="0">
<tr>
<td>
<UL>
<html:errors/>
<html:messages id="msg" message="true">
<li class="error_message"><bean:write name="msg" /></li>
</html:messages>
</UL>
</td>
</tr>
</table><br />
</logic:messagesPresent>
Use this
-----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 21, 2006 9:16 AM
To: Struts Users Mailing List
Subject: Re: Validator Framework 1.29
On 12/20/06, Jim Reynolds <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am having some issues with getting the messages from the validator
> framework from showing. Actually, I have some old code like this:
> <logic:messagesPresent>
> <html:messages id="error">
> <font class="error"><c:out value="${error}"/><br></font>
> </html:messages>
> </logic:messagesPresent>
> that used to work, before upgrading to 1.29. I am getting this error:
> "ccording to TLD or attribute directive in tag file, attribute value
> does not accept any expressions" (I posted this earlier with no
> response).
So its objecting to a run time expression in your <c:out> tag - thats JSTL
not Struts or validator - but I don't think you need it anyway, can't you
just use
<c:out value="error"/>
or
<bean:write name="errror"/>
> Then I am reading through Struts in Action book and they show this
> type of error handling in the jsp page.
>
> <logic:messagesPresent>
> <logic:messages id="error" bean:write name="error" />
> </validator:messages>
> </validator:messagesPresent>
> with a import of this tld.
> uri="/tags/struts-validator" prefix="validator" %>
>
> Anyway, now I am confused and not sure which is the best approach to
> follow. Also, I cannot find the tld for struts-validator? I checked
> the struts jar for a tld, but did not find one, and I checked the
> commons-validator.jar and did not find it there. I don't mind using
> second one from book, but where is tld?
There are no "validator" jsp tags in Struts or Commons Validator - so no TLD
to go with it.
Niall
> Thanks,
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]