It's not a secret anymore!
The moose likes Struts and the fly likes PROB: Chaining Interceptor - Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "PROB: Chaining Interceptor - Struts 2" Watch "PROB: Chaining Interceptor - Struts 2" New topic

PROB: Chaining Interceptor - Struts 2

Pranay Karmakar

Joined: Dec 11, 2009
Posts: 4

I've tried the following,

I've a welcome page which has 2 text fields name i1 & i2. The action name is "action1" which moving to action2 in case of success. The success page of action2 is result.jsp where I don't want to see the excluded value by Chaining Interceptor. The Code is as follows:




After the above coding, both the i1 & i2 are visible on Result page. I want 'i1' to be excluded.

Please help.
David Newton

Joined: Sep 29, 2008
Posts: 12617

First of all, see the chain interceptor docs.

Defining both includes and excludes leads to undefined behavior. And you seem to be passing in essentially random maps for those--so secondly, check your logs, because there will be an exception there. It's like you're trying to combine the "alias" interceptor or something.

In any case... action chaining is almost always a Bad Idea.
Pranay Karmakar

Joined: Dec 11, 2009
Posts: 4
Thanks David.

I've rectified my code above. Please check.

The link is very brief and not having example with "include" or "exclude"

Could you please let me know that how to write the <param> tags with "include" or "exclude" and with some variable names in the struts.xml file.

I may not use it in my application but I want to learn this Chaining Interceptor practically.
I agree. Here's the link:
subject: PROB: Chaining Interceptor - Struts 2
jQuery in Action, 3rd edition