Re: problem with adding ActionMessage to ActionErrors

2004-03-15 Thread yoge
Use
*html:messages id=msg message=false
   bean:write name=msg/
/html:messages*

instead of *html:errors*

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).

Brad Ayers
Senior Programmer Analyst
Granite State Management and Resources
[EMAIL PROTECTED]
603-225-5867 ext. 308
603-224-2581  Fax number
CONFIDENTIALITY NOTICE

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




problem with adding ActionMessage to ActionErrors

2003-12-17 Thread Bradford M. Ayers
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).


Brad Ayers
Senior Programmer Analyst
Granite State Management and Resources
[EMAIL PROTECTED]
603-225-5867 ext. 308
603-224-2581  Fax number

CONFIDENTIALITY NOTICE

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with adding ActionMessage to ActionErrors

2003-12-17 Thread Adam Hardy
On 12/17/2003 09:36 PMnbsp;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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]