Example #1
0
 /** 网页调用 */
 public String doService(HttpServletRequest request, HttpServletResponse response) {
   try {
     String opearate = request.getParameter(OPERATE_KEY);
     if (opearate != null && opearate.trim().length() > 0) {
       RunData data = notifyObactioners(opearate, request, response, null);
       if (data.hasMessage()) return data.getMessage();
     }
     return "";
   } catch (Exception ex) {
     log.error("doService", ex);
     return showMessage(ex.getMessage(), true);
   }
 }
Example #2
0
 /**
  * JSP调用的函数
  *
  * @param request 网页的请求对象
  * @param response 网页的响应对象
  * @return 返回HTML或javascipt的语句
  * @throws Exception 异常
  */
 public String doService(HttpServletRequest request, HttpServletResponse response) {
   try {
     String operate = request.getParameter(OPERATE_KEY);
     if (operate != null && operate.trim().length() > 0) {
       RunData data = notifyObactioners(operate, request, response, null);
       if (data == null) return showMessage("无效操作", false);
       if (data.hasMessage()) return data.getMessage();
     }
     return "";
   } catch (Exception ex) {
     if (dsMasterTable.isOpen() && dsMasterTable.changesPending()) dsMasterTable.reset();
     log.error("doService", ex);
     return showMessage(ex.getMessage(), true);
   }
 }