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

  • Home
  • SEARCH
  • 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 8778561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:34:16+00:00 2026-06-13T19:34:16+00:00

How can i catch this parameter in my Struts2 Custom Interceptor, send from a

  • 0

How can i catch this parameter in my Struts2 Custom Interceptor, send from a JSP page ?

<s:url var="remoteurl" action="jsontable">
    <s:param name="gridName">gridTableID</s:param>
</s:url>
  <sjg:grid
        id="gridTableID"

        caption="Customer Examples (Local Data)"
        href="%{remoteurl}"
        gridModel="gridModel"
        rowNum="-1"
        hidegrid="true"
....

Edit:
My custom stack:

<interceptors>
            <interceptor name="logingInterceptor" class="com.interceptors.LoggingInterceptor"></interceptor>
            <interceptor-stack name="newStack">
                <interceptor-ref name="logingInterceptor" />
                <interceptor-ref name="defaultStack" />
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="newStack"></default-interceptor-ref>
  • 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-13T19:34:17+00:00Added an answer on June 13, 2026 at 7:34 pm

    EDIT 2: if your interceptor can’t get the request parameters, I suggest an atomic approach to the problem. Try small steps, resolve problems one by one.
    In your case, i’ll try as follows:

    1) Put a debug “hello interceptor” inside your interceptor, to see if the call to your action is actually passing THROUGH your custom interceptor.

    If not: check your settings (interceptor, interceptors-stack, packages, actions etc).

    If yes:

    2) Put a normal variable in the form you are posting in a classic way (not ajax or something, just a <s:hidden name="foo" value="blabla"/> variable inside your form in the JSP, posted with an <s:submit button to your action (the actiop mapped for using the interceptor stack with your custom interceptor).
    Try to print out the value of that variable from the interceptor.

    If variable is null:
    check your action mappings again, use Firebug Net module to see if the parameters is actually posted out, etc.

    If variable is read:

    then the problem is in the variable of the JQGrid, check the way you are referencing it in the JSP and what is going out of the page with Firebug again.

    Etc…

    I suggest you to use a new JSP with only your stuff inside, with a new action for displaying and receiving the result, with an empty execute()… just a very very tiny skeleton to test your code being sure nothing external is messing up the worflow…


    EDIT: your Interceptors configuration seems fine (except for defaultStack instead of default-stack, but I’m pretty sure it’s the same).

    Are all of your Actions inside the same <package> in which the <interceptors> is defined ?


    Why on the Interceptor and not in the Action ? How do you need to handle that data ?

    By the way, this is the code:

    public String intercept(ActionInvocation invocation) throws Exception {
    
       final ActionContext context = invocation.getInvocationContext();
       HttpServletRequest request = (HttpServletRequest) context.get(StrutsStatics.HTTP_REQUEST);
    
       String gridName = (String) request.getParameter("gridName");
    
       /* do something */
    
       return invocation.invoke();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't do this in C#: catch (Exception exception) { var wrappedException = new
I can get information about a parameter by StackTrace using something like this: catch
Why can't I catch this exception? My (client) code: Eigen::MatrixXd FFs ; try {
This article on MSDN states that you can use as many try catch blocks
how can I catch all strings from a native windows .exe file and replace
I have a custom routehandler in ASP.NET MVC2 to catch all url's at a
Can you pass an SPListItem object as a parameter into a custom [WebMethod] deployed
Using seam, in pages.xml I can catch the value of a query string parameter
We know that we can catch any unexpected exception at application level by using
Is there some way I can catch when a method generates a write to

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.