You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Sarath Bethapudi <be...@yahoo.com> on 2003/10/24 19:57:00 UTC
printing error from an Action class
I am trying to send an ActionError from my Action
class to a Velocity page.
The code in my Action class is as follows,
ActionErrors erorrs = new ActionErrors();
erorrs.add("invalidlogin", new
ActionError("error.security.invalidlogin"));
saveErrors(request, erorrs);
on the velocity page I am using the following
$!errors.msgs
I am still unable to get the message populated on the
screen. Please help
---
sarath
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: printing error from an Action class
Posted by Nathan Bubna <na...@esha.com>.
Sarath Bethapudi said:
> I am trying to send an ActionError from my Action
> class to a Velocity page.
>
> The code in my Action class is as follows,
>
> ActionErrors erorrs = new ActionErrors();
> erorrs.add("invalidlogin", new
> ActionError("error.security.invalidlogin"));
> saveErrors(request, erorrs);
>
> on the velocity page I am using the following
> $!errors.msgs
>
> I am still unable to get the message populated on the
> screen. Please help
Please don't email the list the same question three times in a row. And
certainly don't add personal emails to me on top of that! it's really
annoying. i am not a personal consultant.
Now, with that out of the way, i would like to gently suggest reading some
documentation. you might take particular interest in documentation related to
the following methods:
add(String property, ActionError error) in the ActionErrors class
and
getMsgs(String property) in the ErrorsTool
i think you'll find even just their javadocs quite enlightening.
afterwards, i *strongly* suggest taking some time to peruse this document:
http://www.catb.org/~esr/faqs/smart-questions.html
i think that would be in everyone's best interests. :)
remember, if you have a problem, first read the manual, then check the
javadocs, then search the archives of relevant mailing lists (struts-user
would likely have helped you). and *then* email the most relevant user list
with your question. if no one helps you for a few hours, WAIT LONGER. if no
one helps you for more than a few days, you may consider kindly asking again
or trying other relevant lists. got it?
Nathan Bubna
nathan@esha.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org