• 大小: 16.81MB
    文件类型: .rar
    金币: 2
    下载: 2 次
    发布日期: 2023-06-17
  • 语言: Java
  • 标签: 源代码  

资源简介

前台使用bootstrap技术,后台使用structs和herbinate, 数据库为mysql, 系统分为老师和学生二个角色,老师可以管理学生和试题,学生可以在线进行答题并且实时获得分数。

资源截图

代码片段和文件信息

package com.action;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.service.StudentServiceImpl;

public class CheckStudentID extends ActionSupport{
/**
 * 
 */
private static final long serialVersionUID = 1L;
private String studentID;
private StudentServiceImpl studentServiceImpl = new StudentServiceImpl();
public String getStudentID() {
return studentID;
}

public void setStudentID(String studentID) {
this.studentID = studentID;
}

@Override
public String execute() throws Exception {
HttpServletResponse response = (HttpServletResponse) ActionContext.getContext().get(ServletActionContext.HTTP_RESPONSE);
response.setCharacterEncoding(“UTF-8“);
PrintWriter out = response.getWriter();
if (studentServiceImpl.getStudentInfo(studentID)!=null) {//如果有重复的话
out.print(“学生编号已存在!请重新输入!“);
}else{
out.print(“可以注册!“);
}
return null;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .......      3231  2015-12-20 17:19  examOnline\.classpath

    .......        50  2015-12-20 17:19  examOnline\.gitignore

    .......       531  2015-12-20 17:19  examOnline\.myhibernatedata

    .......      1558  2015-12-20 17:19  examOnline\.project

    .......       122  2015-12-20 17:19  examOnline\.reverse.properties

    .......       510  2015-12-20 17:19  examOnline\.settings\.jsdtscope

    .......        85  2015-12-20 17:19  examOnline\.settings\org.eclipse.core.resources.prefs

    .......       357  2015-12-20 17:19  examOnline\.settings\org.eclipse.jdt.core.prefs

    .......       481  2015-12-20 17:19  examOnline\.settings\org.eclipse.wst.common.component

    .......       387  2015-12-20 17:19  examOnline\.settings\org.eclipse.wst.common.project.facet.core.xml

    .......        49  2015-12-20 17:19  examOnline\.settings\org.eclipse.wst.jsdt.ui.superType.container

    .......         6  2015-12-20 17:19  examOnline\.settings\org.eclipse.wst.jsdt.ui.superType.name

    .......        66  2015-12-20 17:19  examOnline\.tern-project

    .......       575  2015-12-20 17:19  examOnline\Readme.md

    .......      1407  2015-12-20 17:19  examOnline\src\.struts.mex

    .......      1105  2015-12-20 17:19  examOnline\src\com\action\CheckStudentID.java

    .......       814  2015-12-20 17:19  examOnline\src\com\action\GetRandomSubjects.java

    .......      2114  2015-12-20 17:19  examOnline\src\com\action\LoginAction.java

    .......      2411  2015-12-20 17:19  examOnline\src\com\action\QueryStudentByClassAction.java

    .......       960  2015-12-20 17:19  examOnline\src\com\action\QueryStudentByIDAction.java

    .......      1002  2015-12-20 17:19  examOnline\src\com\action\QueryStudentByNameAction.java

    .......      2385  2015-12-20 17:19  examOnline\src\com\action\QuerySubjecLiketAction.java

    .......      1522  2015-12-20 17:19  examOnline\src\com\action\QuerySubjectAction.java

    .......      1256  2015-12-20 17:19  examOnline\src\com\action\ShowSubjectAnswerAction.java

    .......      1212  2015-12-20 17:19  examOnline\src\com\action\StudentAddAction.java

    .......      1513  2015-12-20 17:19  examOnline\src\com\action\StudentQuery.java

    .......      1966  2015-12-20 17:19  examOnline\src\com\action\SubjectAddAction.java

    .......       647  2015-12-20 17:19  examOnline\src\com\action\SubjectDeleteAction.java

    .......       847  2015-12-20 17:19  examOnline\src\com\action\SubjectPaticularAction.java

    .......      2131  2015-12-20 17:19  examOnline\src\com\action\SubjectUpdateAction.java

............此处省略1402个文件信息

评论

共有 条评论