struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjay Patel <skpate...@gmail.com>
Subject Custom interceptor stack not working
Date Wed, 30 Dec 2009 01:29:46 GMT
Hi,

I am using this simple interceptor configuration, just following
http://struts.apache.org/2.1.8/docs/interceptor-configuration.html :

<struts>
    <package name="default" namespace="/" extends="struts-default">

        <interceptors>
          <interceptor name="security" class="root.SecurityInterceptor"/>
          <interceptor-stack name="secureStack">
            <interceptor-ref name="security"/>
            <interceptor-ref name="defaultStack"/>
          </interceptor-stack>
        </interceptors>

        <default-interceptor-ref name="secureStack"/>

        <global-results>
           <result name="login">/WEB-INF/content/index.jsp</result>
        </global-results>
    </package>
    <constant name="struts.devMode" value="true" />
</struts>

My class definition goes like this:

public class SecurityInterceptor extends AbstractInterceptor {

    public String intercept( ActionInvocation actionInvocation ) throws
Exception {
        throw new Exception();
    }
}

I am scratching my head long since but it simply is not working. Any clues
would help a lot.

-- 
Thanks,
Sanjay
www.sanjaypatel.name

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