editpwdaction.java
来自「在线考试系统的具体实现 利用JSP+myeclipse6.6+tomcat5。5」· Java 代码 · 共 40 行
JAVA
40 行
package org.mmxbb.exam.business.exam;
import org.apache.struts.action.*;
import org.mmxbb.exam.business.*;
import org.mmxbb.exam.dao.ExamineeDAO;
import javax.servlet.http.*;
import java.sql.*;
public class EditPwdAction extends Action {
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
/**@todo: complete the business logic here, this is just a skeleton.*/
EditAdminPwdActionForm editAdminPwdActionForm = (EditAdminPwdActionForm) actionForm;
ExamineeDAO examineeDAO = null;
String passwordPre = null;
String examinee_id = null;
HttpSession s = httpServletRequest.getSession();
LogonBean logon = (LogonBean) s.getAttribute("logon");
examinee_id = new String();
examinee_id = logon.getLogon();
passwordPre = new String();
examineeDAO = new ExamineeDAO();
try {
passwordPre = examineeDAO.findByKey(examinee_id).getPassword();
} catch (SQLException ex) {
ex.printStackTrace();
}
String isAdmin = "false";
editAdminPwdActionForm.setPasswordPre(passwordPre);
editAdminPwdActionForm.setIsAdmin(isAdmin);
return actionMapping.findForward("editpwd");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?