You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Henrique VIECILI <vi...@softplan.com.br> on 2004/01/13 19:23:01 UTC

Exception Handling

Hi,

can anyone explain why :

<bean:write name="org.apache.struts.action.EXCEPTION" /> 

prints "mypackage.Exception: cause"; and

<% anyscope.getAttribute("org.apache.struts.action.EXCEPTION").toString(); %>

prints "null" ??

Henrique Viecili

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


Re: Multiple Beans one Action

Posted by Mark Lowe <ma...@talk21.com>.
you can store one in the session,

FirstForm beanA = (FIrstForm) form;
SecondForm beanB = (SecondForm) session.getAttribute("beanB");

Or nest beanB in beanA or vice versa.

On 13 Jan 2004, at 18:56, Eric C wrote:

> Hello all and happy new year,
>
> suppose I have 2 beans one beanA extends Action Form, the other beanB
> extends ValidatorForm. I have one Action class which needs data from 
> both
> beans. How can I do that ?
>
> Regards,
> ERic
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Multiple Beans one Action

Posted by Eric C <ch...@wanadoo.fr>.
Hello all and happy new year,

suppose I have 2 beans one beanA extends Action Form, the other beanB
extends ValidatorForm. I have one Action class which needs data from both
beans. How can I do that ?

Regards,
ERic


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


Re: Exception Handling

Posted by Henrique VIECILI <vi...@softplan.com.br>.
Hi, i figured out the answer!

i changed the scope in the global exceptions declaration to session instead of
request.

sometimes some atributes in request scope simply disapear, *weird*

Henrique

----- Original Message -----
From: "Henrique VIECILI" <vi...@softplan.com.br>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, January 13, 2004 3:23 PM
Subject: Exception Handling


> Hi,
>
> can anyone explain why :
>
> <bean:write name="org.apache.struts.action.EXCEPTION" />
>
> prints "mypackage.Exception: cause"; and
>
> <% anyscope.getAttribute("org.apache.struts.action.EXCEPTION").toString(); %>
>
> prints "null" ??
>
> Henrique Viecili
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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