Created attachment 19340[details]
The patch introduces an invoke operation to the proxy
The operation is specified by the "op" parameter and the parameters of the JMX
operation are specified (as a comma seperated list) by the "ps" parameter.

This Tomcat 5 enhancement request has been moved to Tomcat 7 (the latest version) since Tomcat 5 development is limited and focussed on bugs and security issues whereas Tomcat 7 is still seeing new feature development.

After rather too long a variation of this patch has been applied to trunk and 7.0.x and will be included in 7.0.24 onwards.
The main changes I made to the proposed patch were:
- fixing a potential NPE when a method required zero parameters
- improving the output when an array was returned (as is often the case with Tomcat MBeans)

Created attachment 28173[details]
2012-01-19_tc8_JMXProxyServlet.patch
Yours covers most common use case of method returning void/null.
I think null values inside arrays should be handled as well.
I am attaching patch that I am thinking about that covers null values in getAttribute() operation as well.

This is ASF Bugzilla: the Apache Software Foundation bug system. In case
of problems with the functioning of ASF Bugzilla, please contact
bugzilla-admin@apache.org.
Please Note: this e-mail address is only for reporting problems
with ASF Bugzilla. Mail about any other subject will be silently
ignored.