📄 continueexamaction.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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.Hashtable;
/**
* User: Tao
* Date: Jun 18, 2003
* Time: 4:11:45 AM
*/
public class ContinueExamAction extends Action
{
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception
{
String submit_id = httpServletRequest.getParameter("SubmitId");
String assign_id = httpServletRequest.getParameter("AssignmentId");
if (submit_id == null || assign_id == null )
{
return actionMapping.findForward("back");
}
Hashtable this_assign = null;
HttpSession session = httpServletRequest.getSession();
Object[] objs = (Object[]) session.getAttribute("ExamTable");
for (int i = 0; i < objs.length; i++)
{
Hashtable h = (Hashtable) objs[i];
if (Integer.valueOf(assign_id).equals(h.get("AssignmentId")))
{
this_assign = h;
break;
}
}
if ( this_assign == null )
{
return actionMapping.findForward("back");
}
session.setAttribute("CurrentAssignment", this_assign);
return actionMapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -