String action = req.getParameter(action);
Method method = this.getClass().getDeclaredMethod
(action,HttpServletRequest.class,HttpServletResponse.class);
method.invoke(this,request,response);
getDeclaredMethod 方法的第一个参数为方法名,第二个参数为方法参数的class类
invoke 方法 第一个参数为实例对象 第二个第三个为实参