exam-master/src/org/mmxbb/exam/business/examinee/SaveEditExamineeAction.java

(完整代码) 1KB

package org.mmxbb.exam.business.examinee;

import java.sql.SQLException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.mmxbb.exam.dao.ExamineeDAO;


public class SaveEditExamineeAction
    extends Action {
  public ActionForward execute(ActionMapping actionMapping,
                               ActionForm actionForm,
                               HttpServletRequest httpServletRequest,
                               HttpServletResponse httpServletResponse) {
    ExamineeDAO examineeDAO = null;
    examineeDAO = new ExamineeDAO();

    String reInitPwd = null;
    reInitPwd = httpServletRequest.getParameter("reInitPwd");
    if (reInitPwd != null) {
      try {
        examineeDAO.reInitPwd(reInitPwd);
      } catch (SQLException ex) {
      }
      return (actionMapping.findForward("showSuccess"));
    }

    ExamineeActionForm examineeActionForm = (ExamineeActionForm) actionForm;

    try {
      examineeDAO.updateExaminee(examineeActionForm);
    } catch (SQLException ex) {
      ex.printStackTrace();
      return (actionMapping.findForward("failure"));
    }
    examineeActionForm.reset();
    return (actionMapping.findForward("success"));

  }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。