That's pretty weird, you could try mapping that action with XML, if the problem goes away, then it is a Codebehind problem, but I can't think of anything causing this.
musachy On Tue, May 19, 2009 at 2:26 PM, <jim_gre...@fws.gov> wrote: > I am using version 0.32 of the JSON plugin with Struts 2.0.11. It seems > to work well except for the fact that the JSON results from my struts > action are inconsistent. > I have annotated my action as follows: > > @Results( { > �...@result(name = "jsonPopsResult", type = JSONResult.class, value = > "", params = {"root", "jsonResult", "noCache", "true"}), > �...@result(name = "jsonRefugesResult", type = JSONResult.class, value > = "", params = {"root", "jsonResult", "noCache", "true"})}) > public class MapQueryAction extends ActionSupport { > ... > } > > Sometimes the response generated by the action is (for example) > > {"trustResources":[{"displayName":"Bull Trout","id":301}]} > > at other times it is > > {"jsonResult":{"trustResources":[{"displayName":"Bull > Trout","id":301}]}} > > Note that the second response has an outer level of wrapping that > corresponds to the root parameter in the annotation (the action property > to be serialized). > > I think (though am not 100% positive) that the change in behavior happens > when I restart my tomcat container, so this smells strongly of a class > loading problem. I've looked for duplicate jars/classes, but have come up > empty. In particular, I have only one json-plugin jar > (json-plugin-0.32.jar) in my application's WEB-INF/lib directory. Has > anyone else experienced this kind of problem with the JSON plugin? > > Thanks, > Jim Greuel -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org