Announcement Announcement Module
Collapse
No announcement yet.
interceptors with struts DispatchAction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment

    Working...
    X