struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: problem with adding ActionMessage to ActionErrors
Date Thu, 18 Dec 2003 00:43:57 GMT
On 12/17/2003 09:36 PM&nbsp;Bradford M. Ayers wrote:
> I noticed in the documentation that ActionError is deprecated, so I
> was trying to be a good doobie and use ActionMessage like the docs
> say to.  So in my code, when I go from this: errors.add(
> ActionErrors.GLOBAL_ERROR, new ActionMessage(
> "error.password.mismatch" )); to this: errors.add(
> ActionErrors.GLOBAL_ERROR, new ActionError( "error.password.mismatch"
> )); when my page tries to resolve     <html:errors/> I get: 
> java.lang.ClassCastException at
> org.apache.struts.taglib.html.ErrorsTag.doStartTag(ErrorsTag.java:215)...
> 
> 
> Has anyone seen this?  I'm using JBoss 3.2.2 (which uses Tomcat 4.1).
> 
Hi Bradford,

I think the ErrorsTag is expecting an ActionErrors collection and you 
are giving it an ActionMessages. Is that so?

I could be wrong but this is an area that I only managed to understand 
for about 30 minutes while I implemented it, and then I forgot it 
immediately. :O

Adam

-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message