exam-master/src/org/mmxbb/exam/business/exam/ExamineeInquiryAction.java

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package org.mmxbb.exam.business.exam;

import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

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.business.LogonBean;
import org.mmxbb.exam.dao.ExamineeInquiryDAO;


public class ExamineeInquiryAction
    extends Action {
  public ActionForward execute(ActionMapping actionMapping,
                               ActionForm actionForm,
                               HttpServletRequest httpServletRequest,
                               HttpServletResponse httpServletResponse) {
    ExamineeInquiryActionForm examineeInquiryActionForm = (
        ExamineeInquiryActionForm) actionForm;
    ExamineeInquiryDAO examineeInquiryDAO = new ExamineeInquiryDAO();
    ArrayList testerPaperSet = new ArrayList();
    
    String examinee_id = null;

    HttpSession s = httpServletRequest.getSession();
    LogonBean logon = (LogonBean) s.getAttribute("logon");
    examinee_id = logon.getLogon();

    
    examineeInquiryDAO.setLength(15);
    int ipage;
    try {
      String page = httpServletRequest.getParameter("page"); //requested page
      ipage = java.lang.Integer.parseInt(page, 10);

    } catch (Exception e) {

      ipage = examineeInquiryActionForm.getPage();
    }
    if (ipage < 1) {
      ipage = 1;
    }

    try {
      testerPaperSet = (ArrayList) examineeInquiryDAO.getSearch(examinee_id,
          ipage);

    } catch (Exception ex1) {
      ex1.printStackTrace();
    }
    String pagestr = examineeInquiryDAO.getPagestr(ipage);

      examineeInquiryActionForm.setPagestr(pagestr); 

    httpServletRequest.setAttribute("testerPaperSet", testerPaperSet);

后面还有 5 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。