Hi guys,

I am trying to find out if it is possible to do some basic DI using
the native DI support in Struts 2.

I can create a bean in struts.xml as -

<bean name="beanName" type="com.MyInterface" class="com.MyImpl" />

and have it injected into my Action using -

@Inject( "beanName" )

Is there a way to pass a primitive or String value to the bean
beanName created using the <bean /> element?

Say something like -
<bean name="beanName" type="com.MyInterface" class="com.MyImpl" >
    <property><name>myString</name><value>Abc</value>
</bean>


Cheers,
Sonny

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

Reply via email to