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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:09:34+00:00 2026-05-26T08:09:34+00:00

This is my struts.xml file. As you can see an action class and an

  • 0

This is my struts.xml file. As you can see an action class and an interceptor are configured.

My question is that, the interceptor is being called, but not the action class.

(Where as in tutorials, I read that after interceptor is executed it calls the action class method)

Please see my code:

<struts>
    <package name="test" extends="struts-default">
        <interceptors>
            <interceptor name="loginkiran" class="vaannila.MyLoginInterCeptor" />
        </interceptors>

        <action name="HelloWorld" class="vaannila.HelloWorld" method="kiran">
            <interceptor-ref name="loginkiran" />
            <result name="SUCCESS">/success.jsp</result>
        </action>
    </package>
</struts>

This is my Action class’s kiran method

public class HelloWorld {

    public String kiran() {
        System.out.println("Hi inside the Kiran Method");

        return "SUCCESS";
    }
}

========================

This is my Interceptor class

public class MyLoginInterCeptor implements Interceptor {

    @Override
    public String intercept(ActionInvocation invocation) throws Exception {
        System.out.println("The server Port is"+str);

        return invocation.invoke();
    }
}
  • 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-05-26T08:09:34+00:00Added an answer on May 26, 2026 at 8:09 am

    You haven’t defined the INPUT result. Define it within struts.xml and direct to a page with

    <s:actionerror/> 
    

    tag and you’ll figure out what was going wrong. If that doesn’t work, try this

       <action name="HelloWorld" class="vaannila.HelloWorld" method="kiran">
            <interceptor-ref name="loginkiran" />
            <interceptor-ref name="basicStack" />
            <result name="SUCCESS">/success.jsp</result>
            <result name="input">/x.jsp</result>
        </action>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to generate xml file from Struts action object. So that I have
I Have following in my struts.xml file <action name=ProductVerification class=com.frontend.ProductVerification> <result name=success>/jsp/product_verification.jsp</result> <result name=input>/jsp/product_verification.jsp</result>
In my struts2 xml file, I see this interceptor def: <interceptors> <interceptor-stack name=dividendinterceptorstack> <interceptor-ref
I have this configuration in struts.xml <action name=updateAction class=it.myApp.action.ajax.UpdateActionAction> <result name=success type=json/> <result name=error
Does Apache Tiles have a devMove like Struts that would reload the tiles.xml file
In my Struts-config.xml file, <action path=/getTareWeight type=com.astrazeneca.usbod.scale.actions.GetTareByBarcodeAction name =getTareByBarcodeForm scope=request validate=true input=/jsp/getTareByBarcode.jsp> <forward name=success
This is my struts.xml <struts> <include file=example.xml/> <constant name=struts.devMode value=true /> <package name=register namespace=/register
I have some code within struts.xml like: <action name=viewApplicationPDF class=com.xxx.abc.web.action.XApplicationPDFAction> <result name=success>/WEB-INF/templates/xApplication.jsp</result> </action> I
This is basically a 'best practices' question. Struts 1 forms have getters and setters
this is my code that I write it but I want to use LINQ

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.