• 大小: 4.72MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-15
  • 语言: Java
  • 标签: javaEE  SSH  成绩管理  

资源简介

可以添加队伍 班级 姓名 照片 赛事 成绩 历史记录 等等

资源截图

代码片段和文件信息

package wangsong.action;

import java.util.Map;

import wangsong.pojo.Admin;
import wangsong.service.AdminService;
import wangsong.service.RyService;

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

@SuppressWarnings(“serial“)
public class AdminAction extends ActionSupport {

private Admin admin;
ActionContext context;
protected AdminService adminService;

@SuppressWarnings({ “unchecked“ “rawtypes“ })
public String execute() throws Exception{
String usr=admin.getUsername();
String pwd=admin.getPassword();
boolean validated=false;
context=ActionContext.getContext();
Map session = context.getSession();
Admin a1 = null;
a1 = (Admin) session.get(“admin“);
if(a1==null){
a1=adminService.validateUser(usr pwd);
if(a1!=null){
session.put(“admin“ a1);
validated = true;
}
}else{
validated=true;
}
if(validated){
return SUCCESS;
}else{
return ERROR;
}
}
@SuppressWarnings({ “unchecked“ “rawtypes“ })
public String regist(){
Admin a =new Admin(admin.getUsername()admin.getPassword());
String username1=a.getUsername();
if(adminService.find(username1)!=null){
return ERROR;
}
Admin a1=null;
a1=adminService.registlogin(a);
if(a1!=null){
Map session=context.getSession();
session.put(“admin“ a1);
return SUCCESS;
}
return ERROR;
}
public String logout() throws Exception{
Map session = ActionContext.getContext().getSession();
session.remove(“admin“);
return SUCCESS;
}
public Admin getAdmin() {
return admin;
}
public void setAdmin(Admin admin) {
this.admin = admin;
}
public AdminService getAdminService() {
return adminService;
}
public void setAdminService(AdminService adminService) {
this.adminService = adminService;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-12-10 01:26  People\
     文件        2294  2016-12-01 18:57  People\.classpath
     文件         434  2016-12-04 18:51  People\.myhibernatedata
     文件        1539  2016-12-01 19:45  People\.project
     目录           0  2016-12-10 01:25  People\.settings\
     文件         522  2016-12-01 18:42  People\.settings\.jsdtscope
     文件         193  2016-12-01 18:49  People\.settings\com.genuitec.runtime.libraries.xml
     文件         106  2016-12-04 17:16  People\.settings\org.eclipse.core.resources.prefs
     文件         364  2016-12-01 18:42  People\.settings\org.eclipse.jdt.core.prefs
     文件         477  2016-12-01 18:42  People\.settings\org.eclipse.wst.common.component
     文件         481  2016-12-01 18:45  People\.settings\org.eclipse.wst.common.project.facet.core.prefs.xml
     文件         513  2016-12-01 18:49  People\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-12-01 18:42  People\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-12-01 18:42  People\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件         425  2016-12-01 19:52  People\.springBeans
     目录           0  2016-12-10 01:25  People\src\
     文件        3639  2016-12-08 16:53  People\src\applicationContext.xml
     文件          28  2016-12-08 21:31  People\src\struts.properties
     文件        1447  2016-12-09 18:39  People\src\struts.xml
     目录           0  2016-12-10 01:26  People\src\wangsong\
     目录           0  2016-12-10 01:25  People\src\wangsong\action\
     文件        1869  2016-12-08 17:36  People\src\wangsong\action\AdminAction.java
     文件        2931  2016-12-06 20:53  People\src\wangsong\action\CjAction.java
     文件        4802  2016-12-08 21:33  People\src\wangsong\action\RyAction.java
     文件        3092  2016-12-08 17:11  People\src\wangsong\action\XmAction.java
     目录           0  2016-12-10 01:25  People\src\wangsong\config\
     文件         962  2016-12-08 17:54  People\src\wangsong\config\admin.xml
     文件         987  2016-12-08 17:58  People\src\wangsong\config\cj.xml
     文件        1527  2016-12-08 21:21  People\src\wangsong\config\ry.xml
     文件        1340  2016-12-08 17:58  People\src\wangsong\config\xm.xml
     目录           0  2016-12-10 01:25  People\src\wangsong\dao\
............此处省略148个文件信息

评论

共有 条评论