File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

PROB: Chaining Interceptor - Struts 2

Pranay Karmakar
Greenhorn

Joined: Dec 11, 2009
Posts: 4
Hi,

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:

index.jsp



Class1.java


Class2.java


result.jsp


struts.xml



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

Please help.
David Newton
Author
Rancher

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
Greenhorn

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

I've rectified my code above. Please check.

The link http://struts.apache.org/2.1.8/docs/chaining-interceptor.html 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: http://aspose.com/file-tools
 
subject: PROB: Chaining Interceptor - Struts 2
 
Similar Threads
Struts 2 Problem
[Solved] Pass bean from invocation action to target action in chain type result
ModelDriver Interceptor + not getting my object
Problem In Execute and Wait Interceptor
a4j is not defined