deluseraction.java

来自「基于JAVA的一个注册系统 最初只是为了公司做演示使用」· Java 代码 · 共 35 行

JAVA
35
字号
package registerapp;import org.apache.struts.action.*;import javax.servlet.http.*;import net.yefei.cmn.user.*;/** @author ye fei* @version 1.00, 2003/04/15* @copyright www.studyjava.com*/public class DelUserAction extends Action {  public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    DelUserForm rf = (DelUserForm) actionForm;    int[] userid  = rf.getUserid();// Validate the request parameters specified by the user      ActionErrors errors = new ActionErrors();    try {                             User user=new User();      user.DeleteUserInfo(userid);    }                     catch (Exception e) {         errors.add(ActionErrors.GLOBAL_ERROR,         new ActionError("error.password.mismatch"));  }  if (!errors.empty()) {                  saveErrors(httpServletRequest, errors);                  return (new ActionForward(actionMapping.getInput()));              }         return actionMapping.findForward("success");}}

⌨️ 快捷键说明

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