pageaction.java

来自「培训考试系统代码」· Java 代码 · 共 27 行

JAVA
27
字号
package com.huawei.icd30.agt.configmng;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.huawei.icd30.common.systemconfig.*;
import java.io.IOException;
import com.huawei.icd30.agt.util.*;

public final class PageAction extends Action {
  public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {

      Initor.systemConfig.put("agt/pageNum",((PageActionForm)actionForm).getPagenum());

      try
      {
         Initor.systemConfig.flush();
      }
      catch(IOException ex)
      {
         ex.printStackTrace();
         httpServletRequest.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
         return (actionMapping.findForward("error"));
      }
      httpServletRequest.setAttribute("successId",SuccessCode.CONFIGMUMOD_SUCCESS);
      return (actionMapping.findForward("success"));
  }
}

⌨️ 快捷键说明

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