Results 1 to 2 of 2

Thread: interceptors with struts DispatchAction

  1. #1
    Join Date
    Jan 2006
    Posts
    5

    Default interceptors with struts DispatchAction

    Hi

    I hope this is the most appropriate place to post this message.

    I tried to add an acegi method level security interceptor to a struts DispatchAction subclass but only the execute() method gets called, and then internally, the right method executed using reflection. For some reason, the interceptor is not called on these internal calls to the other methods..I thought a subclass is created and that the interceptors would still be called..here is a portion of the configuration

    <bean name="securityAutoProxy" class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="proxyTargetClass" value="true"/>
    <property name="beanNames">
    <value>/Test</value>
    </property>
    <property name="interceptorNames">
    <list>
    <value>testInterceptor</value>
    <value>methodSecurityInterceptor</value>
    </list>
    </property>
    </bean>

    is there any way to have the interceptor applied to method calls from the DispatchAction's execute method?

    Thanks,
    Marc Dumontier

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    Internal calls made are does not get intercepted when you use Spring AOP; you need AspectJ for that. See for example the following thread:
    http://forum.springframework.org/showthread.php?t=35012

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •