OK, I'm stuck.

applicationContext.xml (snipped):
<bean id="sMCBaseAction" class="com.secmgmt.struts2.base.SMCBaseAction">
</bean>

struts.xml (snipped):
<constant name="struts.objectFactory"
value="org.apache.struts2.spring.StrutsSpringObjectFactory" />

<interceptor-stack name="validationWorkflowStack">
                                <interceptor-ref name="redirectMessage"/>
                                <interceptor-ref name="prepare"/>
                                <interceptor-ref name="basicStack"/>
                                <interceptor-ref name="validation"/>
                                <interceptor-ref name="operatorHistory"/>
                                <interceptor-ref name="passwordExpired"/>
                                <interceptor-ref name="workflow"/>
</interceptor-stack>
<default-interceptor-ref name="validationWorkflowStack" />

PasswordExpiredInterceptor method:
public void setSMCBaseAction(SMCBaseAction b) throws Exception
        {
            this.action = b;
            l.debug("Calling setSMCBaseAction with: " + b);
            this.initMe();
        }

Actions (and my operatorHistory) interceptor have *other* beans injected
just fine.  Can someone point out where I'm going wrong (I'm sure it's
something stupid).

Thanks!

>-----Original Message-----
>From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
>Sent: Wednesday, September 23, 2009 2:17 PM
>To: 'Struts Users Mailing List'
>Subject: RE: Interceptor IOC with Spring
>
>Doh!  Sorry for the goose chase, I'll review my code and post it if I'm
>still stuck...
>
>>-----Original Message-----
>>From: Musachy Barroso [mailto:musa...@gmail.com]
>>Sent: Wednesday, September 23, 2009 1:59 PM
>>To: Struts Users Mailing List
>>Subject: Re: Interceptor IOC with Spring
>>
>>Meh, it all works. Autorired with/without annotations and @Resource
>>also works (in interceptors). @OP, something is wrong in your
>>configuration, show us the code :)
>>
>>musachy
>>
>>On Wed, Sep 23, 2009 at 10:51 AM, Musachy Barroso <musa...@gmail.com>
>>wrote:
>>> Chris, if autowiring works then using @Autowire with @Qualifier
>>> (equivalent to @Resource) should also work, I have to try that.
>>>
>>> musachy
>>>
>>> On Wed, Sep 23, 2009 at 9:18 AM, Chris Pratt
><thechrispr...@gmail.com>
>>wrote:
>>>> In my struts.xml I have:
>>>>
>>>>  <constant name="struts.objectFactory" value="spring"/>
>>>>
>>>> And at the top of my applicationContext.xml I have:
>>>>
>>>> <beans default-autowire="autodetect" xmlns=...>
>>>>
>>>> And my Interceptors are getting injected just fine.  On another
>>project, I
>>>> have autowiring turned off, but then you have to define each
>>interceptor as
>>>> a bean in the applicationContext.xml and specifically define the
>>objects
>>>> that get injected into it.
>>>>  (*Chris*)
>>>>
>>>> On Wed, Sep 23, 2009 at 7:21 AM, Mike Baranski <
>>>> list-subscripti...@secmgmt.com> wrote:
>>>>
>>>>> Correct me if I'm wrong, please, but if I have an interceptor, it
>>should
>>>>> get
>>>>> injected by spring.
>>>>>
>>>>> I have a bean I'm expecting, the set method written, and the bean
>>defined
>>>>> in
>>>>> applicationContext.
>>>>>
>>>>> My main struts.xml has:
>>>>>
>>>>> <constant name="struts.objectFactory"
>>>>> value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
>>>>>
>>>>> My setter is not getting called, is there anything else I need to
>>do?
>>>>>
>>>>>
>>>>> M.
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------
>-
>>-
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>
>>
>>
>>
>>--
>>"Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>For additional commands, e-mail: user-h...@struts.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>For additional commands, e-mail: user-h...@struts.apache.org


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

Reply via email to