Hello!

I´m having some issues trying to extend the ExceptionMappingInterceptor.

The Struts 2 documentationen says that you can override the publishException
method, 
but I´m not having any luck in doing so, the method never gets called...

My interceptor:

package se.ahlens.intranet.apps;

---Imports here-----

public class CustomInterceptor extends ExceptionMappingInterceptor {

        @Override
        protected void publishException(ActionInvocation invocation,
ExceptionHolder exceptionHolder) {
                // Implement logging
                super.publishException(invocation, exceptionHolder);
        }
        
}

Struts.xml

struts>
        <package name="se.ahlens.intranet.apps" extends="struts-default">

                <interceptors>
                        <interceptor name="test"
                                
class="se.ahlens.intranet.apps.CustomInterceptor">
                        </interceptor>
                        <interceptor-stack name="myStack">
                                <interceptor-ref name="test"></interceptor-ref>
                                <interceptor-ref 
name="basicStack"></interceptor-ref>
                        </interceptor-stack>
                </interceptors>

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

                  -----Actions here ---------

        </package>
</struts>

Anything wrong here?
My publishException never gets called when an exception is thrown...
-- 
View this message in context: 
http://www.nabble.com/Problem-extending-ExceptionMappingInterceptor%2C-need-help%21-tp17398644p17398644.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to