⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enterpracticepaperaction.java

📁 采用Eclispe开发平台
💻 JAVA
字号:
package com.whatratimes.webedu.student;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.validator.DynaValidatorActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * User: Tao
 * Date: Jun 17, 2003
 * Time: 2:21:48 AM
 */
public class EnterPracticePaperAction extends Action
{
    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception
    {

        HttpSession session = httpServletRequest.getSession();

        int total = ((Object[])session.getAttribute("Questions")).length;

        Integer submit_id = (Integer) session.getAttribute("SubmitId");

        DynaValidatorActionForm form = (DynaValidatorActionForm) actionForm;

        form.initialize(actionMapping);
        form.set("SubmitId", submit_id);
        form.set("Total", new Integer(total));

        return actionMapping.findForward("success");
    }

}

⌨️ 快捷键说明

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