资源简介
onlineLearnSystem.rar
代码片段和文件信息
package com.action;
import java.io.PrintWriter;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import com.dao.TAdminDAO;
import com.model.TAdmin;
import com.opensymphony.xwork2.ActionSupport;
public class adminAction extends ActionSupport
{
private int userId;
private String userName;
private String userPw;
private String message;
private String path;
private String userPwNew;
private int index=1;
private int userType;
private TAdminDAO adminDAO;
public String adminAdd()
{
TAdmin admin=new TAdmin();
admin.setUserName(userName);
admin.setUserPw(userPw);
adminDAO.save(admin);
this.setMessage(“操作成功“);
this.setPath(“adminManage.action“);
return “succeed“;
}
public void userLogin() throws Exception
{
//HttpServletRequest request=ServletActionContext.getRequest();
String isSuccess = adminDAO.login(userName userPw userType);
HttpServletResponse response =ServletActionContext.getResponse();
response.setContentType(“text/html;charset=utf-8“);
PrintWriter pw = response.getWriter();
if (isSuccess.equals(“yes“)) {
pw.print(“yes“);
} else {
System.out.println(“======>用户名或者密码错误=====》“);
pw.print(“no“);
}
}
public void logout() throws Exception
{
HttpSession session=ServletActionContext.getRequest().getSession();
HttpServletResponse response =ServletActionContext.getResponse();
session.setAttribute(“userType“ null);
response.setContentType(“text/html;charset=utf-8“);
PrintWriter pw = response.getWriter();
pw.print(“yes“);
}
public void adminPwEdit() throws Exception
{
String isSuccess = adminDAO.adminPwEdit(userPwNew);
HttpServletResponse response =ServletActionContext.getResponse();
response.setContentType(“text/html;charset=utf-8“);
PrintWriter pw = response.getWriter();
if (isSuccess.equals(“yes“)) {
pw.print(“yes“);
} else {
System.out.println(“======>用户名或者密码错误=====》“);
pw.print(“no“);
}
}
public String adminManage()
{
List adminList=adminDAO.findAll();
Map request=(Map)ServletActionContext.getContext().get(“request“);
request.put(“adminList“ adminList);
return ActionSupport.SUCCESS;
}
public String adminDel()
{
adminDAO.delete(adminDAO.findById(userId));
this.setMessage(“删除成功“);
this.setPath(“adminManage.action“);
return “succeed“;
}
public TAdminDAO getAdminDAO()
{
return adminDAO;
}
public void setAdminDAO(TAdminDAO adminDAO)
{
this.adminDAO = adminDAO;
}
public String getMessage()
{
return message;
}
public int getIndex()
{
return index;
}
public void setIndex(int index)
{
this.index = index;
}
public void setMessage(String
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 834 2018-03-01 12:25 onlineLearnSystem\.classpath
文件 1050 2018-03-01 12:25 onlineLearnSystem\.project
文件 567 2018-03-01 12:25 onlineLearnSystem\.settings\.jsdtscope
文件 364 2018-03-01 12:25 onlineLearnSystem\.settings\org.eclipse.jdt.core.prefs
文件 503 2018-03-01 12:25 onlineLearnSystem\.settings\org.eclipse.wst.common.component
文件 345 2018-03-01 12:25 onlineLearnSystem\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2018-03-01 12:25 onlineLearnSystem\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2018-03-01 12:25 onlineLearnSystem\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 5126 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\adminAction.class
文件 3778 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\docAction.class
文件 3699 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\gonggaoAction.class
文件 1115 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\indexAction.class
文件 4531 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\liuyanAction.class
文件 3731 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\playAction.class
文件 4060 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\shipinAction.class
文件 3989 2018-05-21 21:08 onlineLearnSystem\build\classes\com\action\shitiAction.class
文件 3985 2018-05-25 15:23 onlineLearnSystem\build\classes\com\action\stuAction.class
文件 6776 2018-05-26 12:10 onlineLearnSystem\build\classes\com\action\teaAction.class
文件 8883 2018-05-26 11:20 onlineLearnSystem\build\classes\com\action\timuAction.class
文件 7959 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TAdminDAO.class
文件 5600 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TDocDAO.class
文件 5160 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TGonggaoDAO.class
文件 5112 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TLiuyanDAO.class
文件 5064 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TPlayDAO.class
文件 5310 2018-05-24 21:50 onlineLearnSystem\build\classes\com\dao\TScoreDAO.class
文件 5127 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TShipinDAO.class
文件 5656 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TShitiDAO.class
文件 5977 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TStuDAO.class
文件 5980 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TTeaDAO.class
文件 6129 2018-05-21 21:08 onlineLearnSystem\build\classes\com\dao\TTimuDAO.class
............此处省略923个文件信息
相关资源
- blogSSM.rar
- CompTIASecurity+StudyGuide7thEdition.pdf
- 《深度学习之TensorFlow:入门、原理与
- UnderstandingDeepLearninginOneDay.rar
-
75882586Polyu_Pamprint_Databa
se(1).rar - 开放式工业控制系统的软件开发技术
- 频谱分析仪最终版程序.zip
- C题代码.zip
- 算法图解高清版.pdf.zip
- KaoQinMS.zip
- 实时绿幕抠像应用.zip
- 排样遗传算法.zip
- C仿传奇代码.rar
- 侯捷-STL源码解析视频教程及原书PDF
- delphi重庆医保支付demo.rar
- DiskGenius4.9.1-X64.rar
- xp430patch免墨盒程序.zip
- 微擎系统V2.0新版.zip
- DiskGeniusX86X64.rar
- Shadowrocketv2.1.21.ipa
- 前沿和目录(车载以太网).PDF
- SecureCRT中文免安装版.zip
- AI圣经深度学习.rar
- 金橙子激光打标软件EzCad免狗版.exe
- LoginWithReg.zip
- [David_C.Lay]_solution-manual-linear-algebra-a
- ASR_CNN.zip
- OptiFiber.v2.0.rar
- TIMS.zip
- 彩虹最新免授权.zip
评论
共有 条评论