Following up on an older question of mine, I managed to get URL Rewriting working somewhat correctly for my struts project where URLs like search?q=blah
get converted to queries search.action?q=blah
. We use UrlRewriteFilter for this. This seems to forward fine to struts (if making sure it has a filter mapping with FORWARD), but when the ParametersIntercepter
runs it seems to be catching every parameter twice, and adding comma's in between. So the following:
search.action?q=blah
Sets the parameter q on the Criteria object (see further) to:
[ blah, blah ]
The parameters are set using ModelDriven<Criteria>
Where Criteria is a simple class with a bunch of properties to be set from the GET string.
I'm at a loss to explain why this is happening. Has anyone ever seen anything like this? Am I doing something wrong with regards to the filters/interceptors?
edit: It seems the ParametersInterceptor
simply sets the parameters contained inside the ActionContext object. I'm not sure (and am not seeing any debug messages that indicate) where these values are being set in the ActionContext. Does anyone care to clarify how this is all supposed to work?