Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8053865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:59:11+00:00 2026-06-05T07:59:11+00:00

I am trying to extend ExceptionMappingInterceptor. I created a listener which overrides ExceptionMappingInterceptor’s publishException(…)

  • 0

I am trying to extend ExceptionMappingInterceptor. I created a listener which overrides ExceptionMappingInterceptor’s publishException(…) method. But it is not listening for any global exceptions which are not handled in the application.

Here are my configurations.

//Handler

public class GlobalExceptionHandler extends ExceptionMappingInterceptor 
{
    private Logger logger = AppLogger.getLogger(this.getClass());

    @Override
    protected void publishException(ActionInvocation invocation, ExceptionHolder exceptionHolder) 
    {
        logger.error("Global Exception msg: "+ exceptionHolder.getException().getMessage(), exceptionHolder.getException());
        super.publishException(invocation, exceptionHolder);
    }
}

In struts.xml

<interceptors>
     <interceptor name="sessionInterceptor" class="com.jak.session.SessionInterceptor" />
     <interceptor name="exception" class="com.jak.exception.GlobalExceptionHandler" />
     <interceptor-stack name="mymatrixxInterceptorStack">
        <interceptor-ref name="exception"></interceptor-ref>
        <interceptor-ref name="defaultStack"></interceptor-ref>
        <interceptor-ref name="sessionInterceptor"/>
     </interceptor-stack>
</interceptors>

<global-results>
    <result name="exception" type="tiles">myAccount</result>
</global-results>

<global-exception-mappings>
    <exception-mapping exception="java.lang.Exception" result="exception" />
</global-exception-mappings>

<action name="myAccount">
     <interceptor-ref name="mymatrixxInterceptorStack"></interceptor-ref>
     <result type="tiles">errorPage</result>
</action>

While uploading a file I got an exception as ‘No result defined for action com.dsdar.business.offer.CampaignUpdateAction and result input‘. But this exception is not handled by this interceptor. I don’t the reason why it is not listening.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:59:13+00:00Added an answer on June 5, 2026 at 7:59 am

    In struts.xml

     <interceptors>
     <interceptor name="sessionInterceptor" class="com.jak.session.SessionInterceptor" />
            <interceptor name="exception"
                class="com.jak.exception.GlobalExceptionHandler" />
            <interceptor-stack name="mymatrixxInterceptorStack">
                <interceptor-ref name="exception"></interceptor-ref>
                <!--<interceptor-ref name="defaultStack"></interceptor-ref>--><!-- Here!! -->
    
                <interceptor-ref name="myDefaultStack"></interceptor-ref><!--  Here!!  -->
    
                <interceptor-ref name="sessionInterceptor" />
            </interceptor-stack>
    
            <interceptor-stack name="myDefaultStack">
    
                <!-- <interceptor-ref name="exception"/> --><!-- Here!! -->
    
                <interceptor-ref name="alias" />
                <interceptor-ref name="servletConfig" />
                <interceptor-ref name="i18n" />
                <interceptor-ref name="prepare" />
                <interceptor-ref name="chain" />
                <interceptor-ref name="debugging" />
                <interceptor-ref name="scopedModelDriven" />
                <interceptor-ref name="modelDriven" />
                <interceptor-ref name="fileUpload" />
                <interceptor-ref name="checkbox" />
                <interceptor-ref name="multiselect" />
                <interceptor-ref name="staticParams" />
                <interceptor-ref name="actionMappingParams" />
                <interceptor-ref name="params">
                    <param name="excludeParams">dojo\..*,^struts\..*</param>
                </interceptor-ref>
                <interceptor-ref name="conversionError" />
                <interceptor-ref name="validation">
                    <param name="excludeMethods">input,back,cancel,browse</param>
                </interceptor-ref>
                <interceptor-ref name="workflow">
                    <param name="excludeMethods">input,back,cancel,browse</param>
                </interceptor-ref>
            </interceptor-stack>
    
        </interceptors>
    
        <global-results>
            <result name="exception" type="tiles">myAccount</result>
        </global-results>
    
        <global-exception-mappings>
            <exception-mapping exception="java.lang.Exception"
                result="exception" />
        </global-exception-mappings>
    
        <action name="myAccount">
            <interceptor-ref name="mymatrixxInterceptorStack"></interceptor-ref>
            <result type="tiles">errorPage</result>
        </action>
    

    I do not understand English. The reason is, please ask someone. (> _ <)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to extend myStuff object with a new method in a plugin-style fashion, but
I'm trying to extend JButton with Clojure, but I ran into a problem when
I'm trying to extend the SPL ArrayObject but I've hit a little snag. Using
I'm trying to extend the PHP mailer class from Worx by adding a method
I'm trying to extend (not sure what is the correct term for this kind
I am trying to extend tree component in Vaadin. So I created client side
I'm trying to extend my webapp with IronPython, which is working wonderfully so far,
I was trying to extend the shape class to contain an additional variable but
I trying to extend UIButton but I keep getting a EXC_BAD_ACCESS, inside the initializer
I am trying to extend shipping method with respect to cities. senerio : When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.