资源简介
myeclipse项目
代码片段和文件信息
package com.ec.survey.ctrl;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.ec.survey.dao.AdminDAO;
import com.ec.survey.dao.DAOFactory;
import com.ec.survey.dao.QuestionDAO;
import com.ec.survey.dao.SurveyDAO;
import com.ec.survey.dto.Admin;
public class AdminManage extends HttpServlet {
/**
* The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doPost(request response);
}
/**
* The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
String mutex1=““;
//String mutex2=““;
String op=request.getParameter(“op“);
if(“AddAdmin“.equals(op)){
String username=request.getParameter(“username“);
String pwd=request.getParameter(“pwd“);
AdminDAO dao=DAOFactory.getAdminDAO();
Admin admin=new Admin();
admin.setA_user(username);
admin.setA_pass(pwd);
boolean ret1=dao.addAdmin(admin);
if(ret1)
response.sendRedirect(“../admin/AdminList.jsp“);
else
response.sendRedirect(“../admin/OpResult.jsp?op=default&ret=false&words=“+URLEncoder.encode(“增加管理员出错!请联系管理员“ “UTF-8“) );
}
else if(“DelAdmin“.equals(op)){
Long aid=Long.valueOf(request.getParameter(“aid“));
AdminDAO dao=DAOFactory.getAdminDAO();
boolean ret1=dao.delAdmin(aid);
if(ret1)
response.sendRedirect(“../admin/AdminList.jsp“);
else
response.sendRedirect(“../admin/OpResult.jsp?op=default&ret=false&words=“+URLEncoder.encode(“删除管理员出错!请联系管理员“ “UTF-8“));
}else if(“EditAdmin“.equals(op)){
Long aid=Long.valueOf(request.getParameter(“aid“));
String oldpwd=request.getParameter(“oldpwd“);
String pwd=request.getParameter(“pwd“);
String username=request.getParameter(“username“);
AdminDAO dao=DAOFactory.getAdminDAO();
if(dao.checkPwd(username oldpwd)!=true){
response.sendRedirect(“../admin/OpResult.jsp?op=default&ret=false&words=“+URLEncoder.encode(“旧密码错误“ “UTF-8“));
retur
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2009-04-16 19:37 survey\
文件 740 2009-04-10 19:41 survey\.classpath
文件 292 2009-02-28 13:13 survey\.myme
文件 1412 2008-11-22 16:08 survey\.project
目录 0 2009-02-28 16:31 survey\.settings\
文件 406 2008-11-22 16:08 survey\.settings\.jsdtscope
文件 1040 2008-11-06 20:36 survey\.settings\com.genuitec.eclipse.j2eedt.core.prefs
文件 116 2009-04-08 22:48 survey\.settings\org.eclipse.core.resources.prefs
文件 49 2008-11-22 16:08 survey\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2008-11-22 16:08 survey\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 11081 2009-04-14 23:07 survey\dbo.mer
目录 0 2009-03-28 11:20 survey\src\
目录 0 2008-11-13 10:53 survey\src\com\
目录 0 2008-11-13 10:53 survey\src\com\ec\
目录 0 2008-11-28 16:35 survey\src\com\ec\survey\
目录 0 2009-03-15 12:46 survey\src\com\ec\survey\ctrl\
文件 3497 2009-04-10 22:57 survey\src\com\ec\survey\ctrl\AdminManage.java
文件 2550 2009-01-17 00:29 survey\src\com\ec\survey\ctrl\ConfigManage.java
文件 3931 2009-04-09 13:42 survey\src\com\ec\survey\ctrl\li
文件 6735 2009-04-09 23:52 survey\src\com\ec\survey\ctrl\QuestionManage.java
文件 7037 2009-04-09 13:44 survey\src\com\ec\survey\ctrl\ShowSurvey.java
文件 3422 2009-04-09 13:36 survey\src\com\ec\survey\ctrl\StatisManage.java
文件 7334 2009-04-13 09:46 survey\src\com\ec\survey\ctrl\SurveyManage.java
目录 0 2009-02-07 17:50 survey\src\com\ec\survey\dao\
文件 411 2009-03-09 23:16 survey\src\com\ec\survey\dao\AdminDAO.java
文件 535 2009-03-22 21:48 survey\src\com\ec\survey\dao\AnswersheetDAO.java
文件 163 2008-11-28 23:42 survey\src\com\ec\survey\dao\ConfigDAO.java
文件 763 2009-03-13 21:33 survey\src\com\ec\survey\dao\DAOFactory.java
文件 408 2008-11-14 11:31 survey\src\com\ec\survey\dao\GusetbookDAO.java
文件 332 2008-11-14 16:34 survey\src\com\ec\survey\dao\li
目录 0 2009-03-11 08:42 survey\src\com\ec\survey\dao\mssqlimpl\
............此处省略255个文件信息
相关资源
- 调查问卷 java web eclipse 改造版(mysq
- javaSwing编写的订餐系统
- Swarm-2.2-java.zip
- 基于java的旅行社管理系统
- java学生成绩查询系统
- junit-4.1.2 include source and javadoc
- sqlserver + java web开发的在线小说网
- 婚庆管理系统 毕设
- javaweb校友网含mysql表
- java 编写学生宿舍管理系统
- java+mysql网上银行系统
- javaDB驱动
- Java 俄罗斯方块
- JAVA城市道路交通事故救援车辆调度系
- 软件设计大作业
- 停车场管理系统java
- eshop网上商城系统
- 史上最新最全DB2驱动包
- 简单的java购票系统
- java 魔板游戏课程设计
- 基于Ajax技术的个人网站的设计与实现
- 2018-2019java面试宝典最新版(内附赠旧
- 简单网络聊天程序设计JAVA+Eclipse+Jfr
- javaweb权限管理系统
- Java+Access学生成绩管理系统
- websocket兼容IE678
- muJava配置与
- 手机销售后台管理系统
- 图书资料查询系统java jsp
- javaweb项目租房系统
评论
共有 条评论