?? seikyupasschangeaction.java
字號(hào):
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.1/xslt/JavaClass.xslpackage com.dut.struts.action;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;import org.apache.struts.action.ActionError;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionForward;import org.apache.struts.action.ActionMapping;import com.dut.logic.db.Kyokusyo;import com.dut.struts.form.SeikyuPassChangeActionForm;/** * MyEclipse Struts * Creation date: 04-11-2006 * 修改密碼的Action * XDoclet definition: * @struts.action path="/seikyuPassChangeAction" name="seikyuPassChangeActionForm" input="/pages/SeikyuPassChange.jsp" scope="request" validate="true" * @struts.action-forward name="changesuccess" path="/pages/SeikyuMenu.jsp" */public class SeikyuPassChangeAction extends Action { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method execute * @param mapping * @param form * @param request * @param response * @return ActionForward */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { SeikyuPassChangeActionForm seikyuPassChangeActionForm = (SeikyuPassChangeActionForm) form; ActionErrors errors = new ActionErrors(); ActionForward forward = new ActionForward(); Kyokusyo Logic = new Kyokusyo(); String jusuokodo = request.getSession() .getAttribute("jusuokodo").toString();//獲得郵局號(hào) /* * 檢查舊密碼 * 如果錯(cuò)誤,顯示錯(cuò)誤信息 * 否則修改密碼 */ boolean flag = Logic.checkOldpwd(seikyuPassChangeActionForm,jusuokodo); if(!flag){ errors.add("error", new ActionError("seikyupasschange.changepwd.error")); saveErrors(request,errors); forward = new ActionForward(mapping.getInput()); } else{ String message = Logic.changPassword(seikyuPassChangeActionForm, jusuokodo); if(message == null || message.equals("")){ forward = mapping.findForward("changesuccess"); } else{ errors.add("error", new ActionError("seikyupasschange.changepwd.Data.error")); saveErrors(request,errors); forward = new ActionForward(mapping.getInput()); } } return forward; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -