📄 thshowexamaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.onlinestudy.action.teacher;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import com.onlinestudy.domain.Exam;
import com.onlinestudy.service.ExamService;
/**
* MyEclipse Struts
* Creation date: 04-05-2009
*
* XDoclet definition:
* @struts.action parameter="status" validate="true"
*/
public class ThshowExamAction extends DispatchAction {
ExamService examService;
//显示试卷列表
public ActionForward showExam(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
List list = examService.selectExam();
request.setAttribute("list", list);
request.getRequestDispatcher("exam_list.jsp").forward(request, response);
return null;
}
//显示试卷编辑内容
public ActionForward showEditExam(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
int eId = Integer.parseInt(request.getParameter("id"));
Exam exam = examService.selectExamById(eId);
List contentList = examService.selectContentByEid(eId);
request.setAttribute("exam", exam);
request.setAttribute("contentList", contentList);
request.getRequestDispatcher("exam_edit.jsp").forward(request, response);
return null;
}
public void setExamService(ExamService examService) {
this.examService = examService;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -