⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saveeditexamineeaction.java

📁 在线考试系统的具体实现 利用JSP+myeclipse6.6+tomcat5。5.27
💻 JAVA
字号:
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"));

  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -