David Newton wrote:My first thought would be to modify the parameter names in a filter or interceptor--if you're not using these kinds of parameters across the application, an action-specific interceptor might be the cleanest solution. Or just don't process it with Struts--map it to a servlet instead (which could do whatever it needs to, and/or muck with the parameter names, and potentially forward to an action).
But yes--since S2 (and similar) frameworks will try to map parameter names to actual objects, things like this will cause a problem.
Sam Rakshit wrote:Pardon me for my ignorance as I am very new in Struts2. But will the interceptors be invoked even before the request parameters are parsed and set into the value stack? Also, can I use or override an existing interceptor like ParameterInterceptor for this?
Sam Rakshit wrote:Finally after following your advice, and the steps mentioned in this link - http://www.oracle.com/technology/pub/articles/dev2arch/2005/05/decorators.html
I created a servlet filter and overridden the getParameterMap() directly even before struts could start processing the request. I iterate through the keys and check of a .(dot) and remove it and populate another map with the parameter values and the sanitized keys. This is working for me now.
I hope this is a full proof solution. Please comment.