> From: Jasper Rosenberg <jasper_rosenb...@yahoo.com.INVALID> > To: "user@struts.apache.org" <user@struts.apache.org>, > Date: 13.10.2015 13:26 > Subject: How to add a global interceptor > > Hi, > > > > I work on a project with hundreds of struts actions manywith their > own custom interceptor stacks specified. >
Having actions with own interceptor stacks is quite special. Usually people have hundreds of actions but just a few interceptor stacks. And the few stacks are not created by copy-paste but by overriding configuration parameters and adding interceptors at the beginning or end of the stack. > > > We have recently internationalized the site, and so I had aneed to > add an i18n interceptor to the top of every action stack. It would > have been impractical (and difficultto enforce for future actions) > to add the new interceptor to every actiondefinition. > > > > My solution was to override the ActionProxyFactory to returnour own > ActionInvocation, which in turn always prepends the i18n interceptor > tothe interceptor stack during initialization. > In your case that sounds alright. What are the reasons that you need so many different interceptor stacks? Regards, Christoph This Email was scanned by Sophos Anti Virus