You might be getting a ClassCastException, because, you might be using
Struts 1.1, and adding a ActionMessage to ActionErrors and using the
<html:errors/> tag. The tag assumes ActionError object, so, when it
tries to cast your ActionMessage to ActionError, that's where you run
in to ClassCastException. So, instead of <html:errors/> use
<html:messages/> in the way shown below.


errors.add("name", new ActionMessage("user.name.empty.error"));

In jsp use, 
<html:messages id="error" property="name"> 
   <bean:write name="error" filter="false" />
</html:messages>

Kishore Senji.

On Wed, 11 Aug 2004 13:08:14 -0400, Laran Evans <[EMAIL PROTECTED]> wrote:
> When I use <html:errors /> I get a ClassCastException.  So I used
> <html:messages id="x" /> which displayed nothing, but worked.
> 
> ActionErrors doesn't accept ActionError objects any longer (deprecated),
> just ActionMessage objects.
> 
> What's the consensus on the correct way to display <html:errors />
> currently?
> 
> IA
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to