struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Chacón Sánchez" <danielc...@gmail.com>
Subject Re: [Struts 2] setting spring bean from action
Date Mon, 11 Sep 2006 13:19:49 GMT
Find the discussion with this tittle "Double Execution of Struts Actions",
this may help you. You have to verify that you don´t have html errors on the
use of attributes that have the character ' # ' because that will cause the
double execution of an action,

for example <td background="#234567">... The td don´t have an attribute
background, so that's an error, and the double excecution of the actio is
produce, in the discusion Frank mention others possible reasons.*
*
2006/9/10, Ted Husted <husted@apache.org>:
>
> On 9/9/06, Garner Shawn <shawndgarner@gmail.com> wrote:
> > I want to set the value of the spring bean defined in the spring xml
> file.
> > I have the value in the action but I want to set the spring bean's
> > value with it.
>
> Given a matching property, Struts 2 can automatically inject a Spring
> bean into the Action.
>
> Set the beans to autowire and autodect
>
> <beans default-autowire="autodetect">
>
> ....
>
> </beans>
>
> And then create a JavaBean property on your Action that matches the
> Spring bean ID. Be sure that the bean ID name starts with a lowercase
> letter.
>
> The framework will notice that the Action property name matches the
> Spring bean ID, and set the Spring bean to the property.
>
> For more, see http://cwiki.apache.org/WW/spring.html
>
> HTH, Ted.
> * http://husted.com/struts
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message