@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String action = req.getParameter("action");
try {
Method method = this.getClass().getDeclaredMethod("action",HttpServletRequest.class,HttpServletResponse.class);
这里是错误的代码! 把反射里的 参数 action 方法对象,写成 “action” 字符串。
还是反射不熟,代码没练过一遍。