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 8303539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:34:20+00:00 2026-06-08T17:34:20+00:00

In the book ‘ Struts2 in Action ‘, its stated : while actions that

  • 0

In the book ‘Struts2 in Action‘, its stated :

while actions that don’t define any interceptor-refs themselves will
inherit the default interceptors, as soon as an action declares its
own interceptors, it loses that automatic default and must explicitly
name the defaultStack in order to use it.

But in so many example on the net, I see that the action section declares its own interceptors, but still doesn’t need to declare the default stack like here . Their code is :

<action name="TestLogger" class="vaannila.TestLoggerAction">
            <interceptor-ref name="logger" />
            <result name="success">/success.jsp</result>
</action>

Is there something I am missing ?

  • 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-08T17:34:22+00:00Added an answer on June 8, 2026 at 5:34 pm

    That should be an example to show how to configure custom interceptors.Though you can declare and apply this single interceptor but that means other interceptor being provides by the Framework will not gona get executed and most of the functionality provides by framework will not come in to act.

    By what author is trying to explain is that if we define our own interceptor stack and do not inherit default stack or not define other interceptor being used by the framework most of the functionalities will be missing

    Interceptors can be configured on a per-action basis. Your own custom Interceptors can be mixed-and-matched with the Interceptors bundled with the framework.The Interceptors are defined in a stack that specifies the execution order and in most cases while defining our custom interceptor stack we end up either extending default-stack or define the provided interceptor execution in our own way.

    Have a look at how interceptor stack is actually being declared by the framework

    • interceptors

    So in short if you see interceptor stack is a set of interceptors grouped together and they will get fired in the sequence as defined in the stack.

    One more example to define a custom interceptor

    creating_a_login_interceptor

    Hope this will give you some idea

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

Sidebar

Related Questions

Q1 Book suggests that before we register new SqlProfileProvider , we should remove any
The book I am reading says that after allocating an object I need to
The book, Producing Open Source Software , suggests that it's better to have lengthy
One Book(Object Oriented Programming with C++ by E.Balagurusamy) says that const size = 10;
Book I’ learning from claims that intArray has two dimensions. But since calling intArray.GetLength(1)
The book Professional Javascript by Zakas says that 1) IE uses event bubbling 2)
A book described the following steps for a project without any Interface Builder files:
The book 'Modern Compiler Design' is the nice book about compilers. In its source
The book I'm using to learn Yii, is telling me that we're going to
which book teach Prism for WPF? Any recommendation?

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.