91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.81MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-14
  • 語言: Java
  • 標簽: J2EE開發??

資源簡介

這是一個對學生學習開發java web的源碼(代碼編寫不易,1分資源不過分),里面是jsp+Servlet利用mvc模式寫的一個后臺圖書管理系統,里面有數據庫sql,直接添加就可以。

資源截圖

代碼片段和文件信息

package?com.biyeseng.action;

import?java.io.IOException;
import?java.io.PrintWriter;
import?java.sql.*;

import?javax.servlet.ServletException;
import?javax.servlet.http.HttpServlet;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;

import?com.biyeseng.db.DBManager;

/**
?*?添加管理員
?*?@author?biyeseng
?*?@company?www.biyeseng.cn
?*
?*/
public?class?AddAdminAction?extends?HttpServlet?{

/**
?*?Constructor?of?the?object.
?*/
public?AddAdminAction()?{
super();
}

/**
?*?Destruction?of?the?servlet.?

?*/
public?void?destroy()?{
super.destroy();?//?Just?puts?“destroy“?string?in?log
//?Put?your?code?here
}

/**
?*?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?{

response.setContentType(“text/html“);
PrintWriter?out?=?response.getWriter();
String?userName=request.getParameter(“userName“);
String?userPw=request.getParameter(“userPw“);

String?sex=request.getParameter(“sex“);
String?tel=request.getParameter(“tel“);
String?duty=““;
String?birth=request.getParameter(“birth“);
String?ruzhi=request.getParameter(“ruzhi“);
String?type=request.getParameter(“type“);

DBManager?dbm?=?new?DBManager();

String?sql?=?“insert?into?admin(userNameuserPwsextelbirthruzhitype)?values(‘“+userName+“‘‘“+userPw+“‘‘“+sex+“‘‘“+tel+“‘‘“+birth+“‘‘“+ruzhi+“‘‘“+type+“‘)“;

Statement?stat?=?null;
Connection?conn=null;
try?{
conn=dbm.getConnection();
stat?=?conn.createStatement();
System.out.println(sql);
stat.execute(sql);
}?catch?(SQLException?e)?{
//?TODO?Auto-generated?catch?block
e.printStackTrace();
}?finally?{
try?{
if(stat!=null)
stat.close();
if(conn!=null)
conn.close();
}?catch?(SQLException?e)?{
//?TODO?Auto-generated?catch?block
e.printStackTrace();
}
}
response.sendRedirect(“admin/list.jsp“);
out.flush();
out.close();
}

/**
?*?Initialization?of?the?servlet.?

?*
?*?@throws?ServletException?if?an?error?occurs
?*/
public?void?init()?throws?ServletException?{
//?Put?your?code?here
}

}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-01-13?14:27??圖書館管理系統\
?????目錄???????????0??2016-12-05?21:06??圖書館管理系統\tsgglxt\
?????文件????????1610??2016-12-05?19:43??圖書館管理系統\tsgglxt\.classpath
?????目錄???????????0??2017-01-13?14:27??圖書館管理系統\tsgglxt\.myeclipse\
?????文件?????????295??2016-09-19?13:01??圖書館管理系統\tsgglxt\.mymetadata
?????文件????????1617??2016-12-05?19:43??圖書館管理系統\tsgglxt\.project
?????目錄???????????0??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\
?????文件?????????522??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\.jsdtscope
?????文件????????1040??2015-03-30?15:53??圖書館管理系統\tsgglxt\.settings\com.genuitec.eclipse.j2eedt.core.prefs
?????文件?????????423??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\com.genuitec.eclipse.migration.prefs
?????文件?????????200??2016-12-05?19:47??圖書館管理系統\tsgglxt\.settings\org.eclipse.core.resources.prefs
?????文件?????????629??2015-10-12?08:25??圖書館管理系統\tsgglxt\.settings\org.eclipse.jdt.core.prefs
?????文件?????????549??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\org.eclipse.wst.common.component
?????文件?????????412??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\org.eclipse.wst.common.project.facet.core.xml
?????文件??????????49??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2016-12-05?19:43??圖書館管理系統\tsgglxt\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2016-12-05?19:41??圖書館管理系統\tsgglxt\WebRoot\
?????目錄???????????0??2016-09-29?16:50??圖書館管理系統\tsgglxt\WebRoot\meta-INF\
?????文件??????????36??2014-03-15?08:35??圖書館管理系統\tsgglxt\WebRoot\meta-INF\MANIFEST.MF
?????目錄???????????0??2016-12-05?19:41??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\
?????目錄???????????0??2017-01-13?14:25??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\classes\
?????目錄???????????0??2016-12-05?20:40??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\classes\com\
?????目錄???????????0??2017-01-13?14:27??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\classes\com\biyeseng\
?????目錄???????????0??2016-09-29?16:50??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\lib\
?????文件???????59590??2014-03-15?12:01??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar
?????文件??????159509??2014-03-15?12:04??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar
?????文件???????14334??2014-11-23?21:02??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\lib\jspsmartupload.jar
?????文件??????495944??2015-10-12?08:40??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\lib\mysql-connector-java-5.0.4-bin.jar
?????文件??????697910??2015-04-15?23:30??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\lib\poi-2.5.1.jar
?????文件????????4298??2016-09-19?14:33??圖書館管理系統\tsgglxt\WebRoot\WEB-INF\web.xml
?????目錄???????????0??2016-12-05?19:41??圖書館管理系統\tsgglxt\WebRoot\admin\
............此處省略447個文件信息

評論

共有 條評論