I'm not sure I'm convinced.
The way I understand it, the result type 'name' attribute is just that. a name. I can chose any
string I want - like "json" in your example.
In addition to the name attribute, you must enter a class attribute to point to your custom Result class.
Finally in your action,
you should be able to reference that newly created result type by its name.
Tomcat shouldn't care about the name I've used, it's just a pointer to my class isn't it?
My guess is that if you rename your result type from "json" to "myCustomJSON" and reference that in your action configuration, it will still work.
What's actually return is based on what is loaded in your execute method of your Result class.
Here's an example method taken from a tutorial:
As you can see, it's just loading up the response object with 'stuff', so your JSP can do things with it.
I have the action coded and the Result coded, I'm just trying to figure out how to convince Tomcat my configuration is correct!
I actually think I don't even need to go this route. I'm starting to see evidence that I can load up the response object from my action after all (rather than creating a Result class).
I'll post my results.