You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Néstor Boscán <ne...@tcs.com.ve> on 2005/05/12 17:28:24 UTC

How to get the ActionErrors object from the request

Hi
 
Does somebody know how I can get the ActionErrors object from the request???
 
Regards,
 
Néstor Boscán

Re: How to get the ActionErrors object from the request

Posted by Aladin Alaily <st...@aladin.ca>.
Hi Néstor,

You can do that with the following code:

ActionErrors errors = (ActionErrors) request.getAttribute(Globals.ERROR_KEY);

Aladin



> Hi
>
> Does somebody know how I can get the ActionErrors object from the
> request???
>
> Regards,
>
> Néstor Boscán
>


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


Re: How to get the ActionErrors object from the request

Posted by Rutger Heijmerikx <ru...@gmail.com>.
http://www.onjava.com/pub/a/onjava/2003/07/30/jakartastruts.html?page=2

On 5/12/05, Néstor Boscán <ne...@tcs.com.ve> wrote:
> Hi
> 
> Does somebody know how I can get the ActionErrors object from the request???
> 
> Regards,
> 
> Néstor Boscán
> 
> 


-- 
       __                __                         
.----.|  |--.-----.----.|  |--.-----.--.--.--------.
|  __||     |  -__|  __||    <|__ --|  |  |        |
|____||__|__|_____|____||__|__|_____|_____|__|__|__|
 http://www.checksum.org/ ..... rutger@checksum.org

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


RE: How to get the ActionErrors object from the request

Posted by "Freddy Villalba A." <fv...@pericless.com>.
Hello,

There is the "nice" way (tags) - which I deduce from a previous posting you
already know - and then there are many "dirty" ways. For instance, you can
access it directly. However, in that case, you have to find out the key
under which Struts stores that object. There is one, that I can assure
you... however, I can't remember what it was. Anyway, it's quite easy to
sort it out (print out all key-value pairs).

There is another shortcut you can take: take a look at the code behind the
tags and "imitate" that code...

I'm sure there must be plenty of other ways to accomplish this... but these
are the 2 I remember at the moment (I'm a bit rusty, I know...)

My 2 cents.

-----Mensaje original-----
De: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve]
Enviado el: jueves, 12 de mayo de 2005 17:28
Para: 'Struts Users Mailing List'
Asunto: How to get the ActionErrors object from the request


Hi

Does somebody know how I can get the ActionErrors object from the request???

Regards,

Néstor Boscán


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