Method method=obj.getClass().getMethod("execute", new Class[]{HttpServletRequest.class, HttpServletResponse.class});
method.invoke(obj,new Object[]{reques,reponse});
http://192.168.0.116:8500/form?cmd=register&accountname=gee2&password=123
Method m = getClass().getMethod(cmd,new Class[]{MFormNotify.class, HttpServletResponse.class});
m.invoke(this,notify,response);
其中cmd是所要执行的函数名称;
new Class[]{MFormNotify.class, HttpServletResponse.class} 是所要执行的函数参数类型
注:所调用的函数参数不能为private.