• 大小: 1.61MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-03
  • 语言: Java
  • 标签: yb  

资源简介

学报管理系统(jsp+servlet+javabean)

资源截图

代码片段和文件信息

package admin;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
//
import common.Common;

public class AddAdminServlet extends HttpServlet 
{
//变量声明
private String loginName;//登录名
private String loginPwd;//密码
private String trueName;//真实姓名
private String sex;//性别
private String phone;//联系电话
private String ctfPwd;//确认密码
private String str=“addAdmin“;//标识字符串
private AdminBean objAdminBean;

public AddAdminServlet()
{
super();
}

public void destroy() {
super.destroy();
}


public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(“text/html“);
        //设置编码
    request.setCharacterEncoding(“GBK“);
    response.setCharacterEncoding(“GBK“);

PrintWriter out = response.getWriter();

out.println(“tle>增加管理员结果页面tle>“);
out.println(“ta http-equiv=refresh content=“
+Common.refreshTime+“;url=‘back.jsp?mID=“+str+“‘>“);
out.println(““);

        //实例化AdminBean
this.objAdminBean=new AdminBean();

//获取表单中的数据
this.trueName=request.getParameter(“txtTrueName“).toString();
this.sex=request.getParameter(“radSex“).toString();
this.phone=request.getParameter(“txtPhone“).toString();
this.loginName=request.getParameter(“txtLoginName“).toString();
this.loginPwd=request.getParameter(“txtPwd“).toString();
this.ctfPwd=request.getParameter(“txtCtfPwd“).toString();

if(this.trueName==null || this.trueName==““)
{
out.println(“请填写您的真实姓名......“);
}
else if(this.phone==null || this.phone==““)
{
out.println(“请填写您的联系电话......“);
}
else if(this.loginName == null || this.loginName== ““)
{
out.println(“请填写您的登录时的用户名......“);
}
else if(this.loginPwd ==null || this.loginPwd ==““)
{
out.println(“请填写您的登录密码......“);
}
else if(this.ctfPwd == null || this.ctfPwd ==““)
{
out.println(“请填写确认密码......“);
}
else if(!this.ctfPwd.equals(this.loginPwd))
{
out.println(“对不起,您输入的确认密码和登录密码不一致......“);
}
else if(this.objAdminBean.judgeExistName(this.loginName)==true)
{
out.println(“用户名“+this.loginName+“已经存在,请重新输入一个......“);

}
else
{
this.objAdminBean.setLoginName(loginName);
this.objAdminBean.setLoginPwd(loginPwd);
this.objAdminBean.setTrueName(trueName);
this.objAdminBean.setSex(sex);
this.objAdminBean.setPhone(phone);

if(this.objAdminBean.addAdmin()==true)
{
out.println(“此次增加管理员成功!“);
}
}
out.println(“


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

     文件    3145728  2008-11-01 16:08  yb\Database\Transaction.mdf

     文件    1048576  2008-11-01 16:08  yb\Database\Transaction_log.ldf

     文件       5325  2008-10-08 14:26  yb\server.xml

     文件        340  2008-09-04 19:34  yb\yb\.classpath

     文件        280  2008-11-11 17:37  yb\yb\.mymetadata

     文件         66  2008-10-24 20:12  yb\yb\.myumldata

     文件       1220  2008-10-24 20:06  yb\yb\.project

     文件       1040  2008-10-24 19:42  yb\yb\.settings\com.genuitec.eclipse.j2eedt.core.prefs

     文件       3520  2008-10-29 21:59  yb\yb\src\admin\AddAdminServlet.java

     文件       4554  2008-10-26 10:41  yb\yb\src\admin\AdminBean.java

     文件       2721  2008-10-29 21:59  yb\yb\src\admin\LoginServlet.java

     文件       3148  2008-10-29 21:59  yb\yb\src\admin\UpdateAdminServlet.java

     文件       6426  2008-09-08 21:41  yb\yb\src\com\jspsmart\upload\File.class

     文件       6689  2008-09-08 21:56  yb\yb\src\com\jspsmart\upload\File.java

     文件       1864  2008-09-08 21:41  yb\yb\src\com\jspsmart\upload\Files.class

     文件       1755  2008-09-08 21:56  yb\yb\src\com\jspsmart\upload\Files.java

     文件       1856  2008-09-08 21:41  yb\yb\src\com\jspsmart\upload\Request.class

     文件       2053  2008-09-08 21:56  yb\yb\src\com\jspsmart\upload\Request.java

     文件      16869  2008-09-08 21:41  yb\yb\src\com\jspsmart\upload\SmartUpload.class

     文件      24332  2008-09-08 21:56  yb\yb\src\com\jspsmart\upload\SmartUpload.java

     文件        389  2008-09-08 21:41  yb\yb\src\com\jspsmart\upload\SmartUploadException.class

     文件        399  2008-09-08 21:56  yb\yb\src\com\jspsmart\upload\SmartUploadException.java

     文件        112  2008-10-28 21:14  yb\yb\src\common\Common.java

     文件       1395  2008-10-31 20:55  yb\yb\src\common\ReadWord.java

     文件       2268  2008-10-25 22:31  yb\yb\src\conn\ConBean.java

     文件      10306  2008-11-11 18:24  yb\yb\src\edition\AddEditionServlet.java

     文件       4815  2008-10-28 12:47  yb\yb\src\edition\EditionBean.java

     文件       3830  2008-10-29 22:00  yb\yb\src\edition\SelectEditionServlet.java

     文件       2349  2008-10-29 22:00  yb\yb\src\editionCountS\AddEditionCountServlet.java

     文件       4392  2008-10-26 10:27  yb\yb\src\editionCountS\EditionCountBean.java

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

评论

共有 条评论