• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PROB: Chaining Interceptor - Struts 2

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
What? What, what, what? What what tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic