├── README.txt ├── Students ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ └── org.eclipse.wst.jsdt.ui.superType.name ├── WebContent │ ├── META-INF │ │ └── MANIFEST.MF │ ├── WEB-INF │ │ ├── lib │ │ │ ├── antlr-2.7.7.jar │ │ │ ├── asm-3.3.jar │ │ │ ├── asm-commons-3.3.jar │ │ │ ├── asm-tree-3.3.jar │ │ │ ├── commons-fileupload-1.3.2.jar │ │ │ ├── commons-io-2.2.jar │ │ │ ├── commons-lang3-3.2.jar │ │ │ ├── dom4j-1.6.1.jar │ │ │ ├── freemarker-2.3.22.jar │ │ │ ├── hibernate-commons-annotations-4.0.2.Final.jar │ │ │ ├── hibernate-core-4.2.4.Final.jar │ │ │ ├── hibernate-jpa-2.0-api-1.0.1.Final.jar │ │ │ ├── javassist-3.11.0.GA.jar │ │ │ ├── javassist-3.15.0-GA.jar │ │ │ ├── jboss-logging-3.1.0.GA.jar │ │ │ ├── jboss-transaction-api_1.1_spec-1.0.1.Final.jar │ │ │ ├── junit-4.10.jar │ │ │ ├── log4j-api-2.3.jar │ │ │ ├── log4j-core-2.3.jar │ │ │ ├── mysql-connector-java-5.1.13-bin.jar │ │ │ ├── ognl-3.0.21.jar │ │ │ ├── struts2-core-2.3.34.jar │ │ │ └── xwork-core-2.3.34.jar │ │ └── web.xml │ ├── components │ │ └── dtree │ │ │ ├── dtree.css │ │ │ ├── dtree.js │ │ │ └── img │ │ │ ├── base.gif │ │ │ ├── cd.gif │ │ │ ├── empty.gif │ │ │ ├── folder.gif │ │ │ ├── folderopen.gif │ │ │ ├── globe.gif │ │ │ ├── imgfolder.gif │ │ │ ├── join.gif │ │ │ ├── joinbottom.gif │ │ │ ├── line.gif │ │ │ ├── minus.gif │ │ │ ├── minusbottom.gif │ │ │ ├── musicfolder.gif │ │ │ ├── nolines_minus.gif │ │ │ ├── nolines_plus.gif │ │ │ ├── page.gif │ │ │ ├── plus.gif │ │ │ ├── plusbottom.gif │ │ │ ├── question.gif │ │ │ └── trash.gif │ ├── css │ │ ├── default.css │ │ └── index.css │ ├── images │ │ ├── admin.png │ │ ├── arror.gif │ │ ├── icon_default.gif │ │ └── welcome.jpg │ ├── index.jsp │ ├── js │ │ └── Calendar3.js │ ├── students │ │ ├── Students_add.jsp │ │ ├── Students_add_success.jsp │ │ ├── Students_modify.jsp │ │ ├── Students_modify_success.jsp │ │ └── Students_query_success.jsp │ ├── tree.jsp │ └── users │ │ ├── Users_login.jsp │ │ ├── Users_login_main.jsp │ │ └── Users_login_success.jsp ├── build │ └── classes │ │ ├── action │ │ ├── StudentsAction.class │ │ ├── SuperAction.class │ │ └── UsersAction.class │ │ ├── db │ │ └── MyHibernateSessionFactory.class │ │ ├── entity │ │ ├── Students.class │ │ ├── Students.hbm.xml │ │ ├── TestStudents.class │ │ ├── Users.class │ │ └── Users.hbm.xml │ │ ├── hibernate.cfg.xml │ │ ├── service │ │ ├── StudentsDAO.class │ │ ├── UsersDAO.class │ │ └── impl │ │ │ ├── StudentDAOimpl.class │ │ │ ├── TestStudentsDAOimpl.class │ │ │ ├── TestUsersDAOimpl.class │ │ │ └── UserDAOimpl.class │ │ └── struts.xml ├── src │ ├── action │ │ ├── StudentsAction.java │ │ ├── SuperAction.java │ │ └── UsersAction.java │ ├── db │ │ └── MyHibernateSessionFactory.java │ ├── entity │ │ ├── Students.hbm.xml │ │ ├── Students.java │ │ ├── Users.hbm.xml │ │ └── Users.java │ ├── hibernate.cfg.xml │ ├── service │ │ ├── StudentsDAO.java │ │ ├── UsersDAO.java │ │ └── impl │ │ │ ├── StudentDAOimpl.java │ │ │ └── UserDAOimpl.java │ └── struts.xml └── test │ ├── entity │ └── TestStudents.java │ └── service │ └── impl │ ├── TestStudentsDAOimpl.java │ └── TestUsersDAOimpl.java ├── 前端素材 ├── components │ └── dtree │ │ ├── dtree.css │ │ ├── dtree.js │ │ └── img │ │ ├── base.gif │ │ ├── cd.gif │ │ ├── empty.gif │ │ ├── folder.gif │ │ ├── folderopen.gif │ │ ├── globe.gif │ │ ├── imgfolder.gif │ │ ├── join.gif │ │ ├── joinbottom.gif │ │ ├── line.gif │ │ ├── minus.gif │ │ ├── minusbottom.gif │ │ ├── musicfolder.gif │ │ ├── nolines_minus.gif │ │ ├── nolines_plus.gif │ │ ├── page.gif │ │ ├── plus.gif │ │ ├── plusbottom.gif │ │ ├── question.gif │ │ └── trash.gif ├── css │ ├── default.css │ └── index.css ├── images │ ├── admin.png │ ├── arror.gif │ ├── icon_default.gif │ └── welcome.jpg ├── js │ └── Calendar3.js ├── sql │ └── test.sql └── 所有的jsp文件 │ ├── index.jsp │ ├── students │ ├── Students_add.jsp │ ├── Students_add_success.jsp │ ├── Students_modify.jsp │ ├── Students_modify_success.jsp │ └── Students_query_success.jsp │ ├── tree.jsp │ └── users │ ├── Users_login.jsp │ ├── Users_login_main.jsp │ └── Users_login_success.jsp └── 文档 ├── Structs+Hibernate4开发学生信息管理功能--(一)环境搭建.doc ├── Struts2+Hibernate4开发学生信息管理功能--(三)用户登录模块.doc ├── Struts2+Hibernate4开发学生信息管理功能--(二)Struts2和Hibernate整合.doc └── Struts2+Hibernate4开发学生信息管理功能--(四)学生信息管理模块.doc /README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/README.txt -------------------------------------------------------------------------------- /Students/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Students/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Students 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jem.workbench.JavaEMFNature 26 | org.eclipse.wst.common.modulecore.ModuleCoreNature 27 | org.eclipse.wst.common.project.facet.core.nature 28 | org.eclipse.jdt.core.javanature 29 | org.eclipse.wst.jsdt.core.jsNature 30 | 31 | 32 | -------------------------------------------------------------------------------- /Students/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Students/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /Students/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Students/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Students/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /Students/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /Students/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/antlr-2.7.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/antlr-2.7.7.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/asm-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/asm-3.3.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/asm-commons-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/asm-commons-3.3.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/asm-tree-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/asm-tree-3.3.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/commons-fileupload-1.3.2.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/commons-io-2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/commons-io-2.2.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/commons-lang3-3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/commons-lang3-3.2.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/dom4j-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/dom4j-1.6.1.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/freemarker-2.3.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/freemarker-2.3.22.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/hibernate-commons-annotations-4.0.2.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/hibernate-commons-annotations-4.0.2.Final.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/hibernate-core-4.2.4.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/hibernate-core-4.2.4.Final.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/javassist-3.15.0-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/javassist-3.15.0-GA.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/jboss-logging-3.1.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/jboss-logging-3.1.0.GA.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/junit-4.10.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/junit-4.10.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/log4j-api-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/log4j-api-2.3.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/log4j-core-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/log4j-core-2.3.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/mysql-connector-java-5.1.13-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/mysql-connector-java-5.1.13-bin.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/ognl-3.0.21.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/ognl-3.0.21.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/struts2-core-2.3.34.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/struts2-core-2.3.34.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/lib/xwork-core-2.3.34.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/WebContent/WEB-INF/lib/xwork-core-2.3.34.jar -------------------------------------------------------------------------------- /Students/WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Students 4 | 5 | 6 | index.html 7 | index.htm 8 | index.jsp 9 | default.html 10 | default.htm 11 | default.jsp 12 | 13 | 14 | struts2 15 | org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 16 | 17 | 18 | 19 | struts2 20 | /* 21 | 22 | -------------------------------------------------------------------------------- /Students/WebContent/components/dtree/dtree.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------| 2 | | dTree 2.05 | www.destroydrop.com/javascript/tree/ | 3 | |---------------------------------------------------| 4 | | Copyright (c) 2002-2003 Geir Landr? | 5 | |--------------------------------------------------*/ 6 | 7 | .dtree { 8 | font-size: 12px; 9 | color: #666; 10 | white-space: nowrap; 11 | } 12 | .dtree img { 13 | border: 0px; 14 | vertical-align: middle; 15 | } 16 | .dtree a { 17 | color: #333; 18 | text-decoration: none; 19 | } 20 | .dtree a.node, .dtree a.nodeSel { 21 | white-space: nowrap; 22 | padding: 1px 2px 1px 2px; 23 | } 24 | .dtree a.node:hover, .dtree a.nodeSel:hover { 25 | color: #333; 26 | text-decoration: underline; 27 | } 28 | .dtree a.nodeSel { 29 | background-color: #c0d2ec; 30 | } 31 | .dtree .clip { 32 | overflow: hidden; 33 | } -------------------------------------------------------------------------------- /Students/WebContent/components/dtree/dtree.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------| 2 | | dTree 2.05 | www.destroydrop.com/javascript/tree/ | 3 | |---------------------------------------------------| 4 | | Copyright (c) 2002-2003 Geir Landr? | 5 | | | 6 | | This script can be used freely as long as all | 7 | | copyright messages are intact. | 8 | | | 9 | | Updated: 17.04.2003 | 10 | |--------------------------------------------------*/ 11 | 12 | // Node object 13 | function Node(id, pid, name, url, title, target, icon, iconOpen, open) { 14 | this.id = parseInt(id); 15 | this.pid = parseInt(pid); 16 | this.name = name; 17 | this.url = url; 18 | this.title = title; 19 | this.target = target; 20 | this.icon = icon; 21 | this.iconOpen = iconOpen; 22 | this._io = open || false; 23 | this._is = false; 24 | this._ls = false; 25 | this._hc = false; 26 | this._ai = 0; 27 | this._p; 28 | }; 29 | 30 | // Tree object 31 | function dTree(objName) { 32 | this.config = { 33 | target : null, 34 | folderLinks : true, 35 | useSelection : true, 36 | useCookies : true, 37 | useLines : true, 38 | useIcons : true, 39 | useStatusText : false, 40 | closeSameLevel : false, 41 | inOrder : false 42 | } 43 | this.icon = { 44 | root : dtreeIconBasePath + '/img/base.gif', 45 | folder : dtreeIconBasePath + '/img/folder.gif', 46 | folderOpen : dtreeIconBasePath + '/img/folderopen.gif', 47 | node : dtreeIconBasePath + '/img/page.gif', 48 | empty : dtreeIconBasePath + '/img/empty.gif', 49 | line : dtreeIconBasePath + '/img/line.gif', 50 | join : dtreeIconBasePath + '/img/join.gif', 51 | joinBottom : dtreeIconBasePath + '/img/joinbottom.gif', 52 | plus : dtreeIconBasePath + '/img/plus.gif', 53 | plusBottom : dtreeIconBasePath + '/img/plusbottom.gif', 54 | minus : dtreeIconBasePath + '/img/minus.gif', 55 | minusBottom : dtreeIconBasePath + '/img/minusbottom.gif', 56 | nlPlus : dtreeIconBasePath + '/img/nolines_plus.gif', 57 | nlMinus : dtreeIconBasePath + '/img/nolines_minus.gif' 58 | }; 59 | this.obj = objName; 60 | this.aNodes = []; 61 | this.aIndent = []; 62 | this.root = new Node(-1); 63 | this.selectedNode = null; 64 | this.selectedFound = false; 65 | this.completed = false; 66 | }; 67 | 68 | // Adds a new node to the node array 69 | dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { 70 | this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); 71 | }; 72 | 73 | // Open/close all nodes 74 | dTree.prototype.openAll = function() { 75 | this.oAll(true); 76 | }; 77 | dTree.prototype.closeAll = function() { 78 | this.oAll(false); 79 | }; 80 | 81 | // Outputs the tree to the page 82 | dTree.prototype.toString = function() { 83 | var str = '
\n'; 84 | if (document.getElementById) { 85 | if (this.config.useCookies) this.selectedNode = this.getSelected(); 86 | str += this.addNode(this.root); 87 | } else str += 'Browser not supported.'; 88 | str += '
'; 89 | if (!this.selectedFound) this.selectedNode = null; 90 | this.completed = true; 91 | return str; 92 | }; 93 | 94 | // Creates the tree structure 95 | dTree.prototype.addNode = function(pNode) { 96 | var str = ''; 97 | var n=0; 98 | if (this.config.inOrder) n = pNode._ai; 99 | for (n; n'; 131 | } 132 | if (node.url) { 133 | str += ''; 143 | str += node.name; 144 | if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; 145 | str += ''; 146 | if (node._hc) { 147 | str += '
'; 148 | str += this.addNode(node); 149 | str += '
'; 150 | } 151 | this.aIndent.pop(); 152 | return str; 153 | }; 154 | 155 | // Adds the empty and line icons 156 | dTree.prototype.indent = function(node, nodeId) { 157 | var str = ''; 158 | if (this.root.id != node.pid) { 159 | for (var n=0; n'; 161 | (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); 162 | if (node._hc) { 163 | str += ''; 167 | } else str += ''; 168 | } 169 | return str; 170 | }; 171 | 172 | // Checks if a node has any children and if it is the last sibling 173 | dTree.prototype.setCS = function(node) { 174 | var lastId; 175 | for (var n=0; n 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | response.sendRedirect(path+"/users/Users_login.jsp"); 6 | %> 7 | -------------------------------------------------------------------------------- /Students/WebContent/js/Calendar3.js: -------------------------------------------------------------------------------- 1 |  2 | /////////////////////////调用实例 3 | //
4 | // 交易查询: 从 5 | // 7 | // 8 | // 至 9 | // 11 | // 12 | 13 | //
14 | 15 | '); 367 | __ci.document.writeln('<\/style>'); 368 | __ci.document.writeln('<\/head>'); 369 | __ci.document.writeln(''); 370 | __ci.document.writeln('<\/body>'); 371 | __ci.document.writeln('<\/html>'); 372 | __ci.document.close(); 373 | document.writeln('<\/div>'); 374 | var calendar = new Calendar(); 375 | //--> -------------------------------------------------------------------------------- /Students/WebContent/students/Students_add.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 78 | 79 | 80 | 81 | 87 |
88 |
89 |
90 | 91 | 添加学生资料 92 |
93 |
94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 |
姓名:
性别:
出生日期: 108 |
地址:
118 |
119 | 120 | 121 |
122 | 123 | -------------------------------------------------------------------------------- /Students/WebContent/students/Students_add_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 78 | 79 | 86 |
87 | 88 |
89 |
90 | 添加成功,继续添加? 91 | 92 |
93 | 94 | -------------------------------------------------------------------------------- /Students/WebContent/students/Students_modify.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 78 | 79 | 80 | 81 | 87 |
88 |
89 |
90 | 91 | 修改学生资料 92 |
93 |
94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 117 | 118 | 119 | 120 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 |
学号:
姓名:
性别: 108 | 109 | 男 110 | 女 111 | 112 | 113 | 男 114 | 女 115 | 116 |
出生日期:" 123 | /> 124 |
地址:
134 |
135 | 136 | 137 |
138 | 139 | -------------------------------------------------------------------------------- /Students/WebContent/students/Students_modify_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 78 | 79 | 86 |
87 | 88 |
89 |
90 | 修改成功,返回学生列表 91 | 92 |
93 | 94 | -------------------------------------------------------------------------------- /Students/WebContent/students/Students_query_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 79 | 80 | 86 |
87 |
88 |
89 | 添加学生 90 |
91 |
92 | 查找学生 93 |
94 |
95 |
96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
学号姓名性别出生日期地址操作
">" onclick="javascript: return confirm('真的要删除吗?');">删除
128 |
129 | 130 | -------------------------------------------------------------------------------- /Students/WebContent/tree.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 导航树 10 | 11 | 12 | 13 | 14 | 15 | 16 | 29 | 55 | 59 |
60 | 102 |
103 | 104 | -------------------------------------------------------------------------------- /Students/WebContent/users/Users_login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 用户登录 13 | 14 | 15 | 229 | 230 |
231 | 238 |
239 |
240 |
241 |
242 |
243 |
244 | 270 |
271 |
272 |
273 | 276 |
277 | 278 | -------------------------------------------------------------------------------- /Students/WebContent/users/Users_login_main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 78 | 79 | 82 |
83 | 84 |
85 |
86 | 87 | 88 |
89 | 90 | -------------------------------------------------------------------------------- /Students/WebContent/users/Users_login_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | <%@page isELIgnored="false" %> 7 | 8 | 9 | 10 | 后台管理 11 | 12 | 13 | 14 | 15 |
16 | 36 | 39 |
40 | 41 |
42 | 43 |
44 | 45 | 57 | -------------------------------------------------------------------------------- /Students/build/classes/action/StudentsAction.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/action/StudentsAction.class -------------------------------------------------------------------------------- /Students/build/classes/action/SuperAction.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/action/SuperAction.class -------------------------------------------------------------------------------- /Students/build/classes/action/UsersAction.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/action/UsersAction.class -------------------------------------------------------------------------------- /Students/build/classes/db/MyHibernateSessionFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/db/MyHibernateSessionFactory.class -------------------------------------------------------------------------------- /Students/build/classes/entity/Students.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/entity/Students.class -------------------------------------------------------------------------------- /Students/build/classes/entity/Students.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Students/build/classes/entity/TestStudents.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/entity/TestStudents.class -------------------------------------------------------------------------------- /Students/build/classes/entity/Users.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/entity/Users.class -------------------------------------------------------------------------------- /Students/build/classes/entity/Users.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Students/build/classes/hibernate.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | root 9 | root 10 | 11 | com.mysql.jdbc.Driver 12 | jdbc:mysql:///test?useUnicode=true&characterEncoding=UTF-8 13 | 14 | org.hibernate.dialect.MySQLDialect 15 | true 16 | 17 | true 18 | update 19 | 20 | thread 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Students/build/classes/service/StudentsDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/service/StudentsDAO.class -------------------------------------------------------------------------------- /Students/build/classes/service/UsersDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/service/UsersDAO.class -------------------------------------------------------------------------------- /Students/build/classes/service/impl/StudentDAOimpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/service/impl/StudentDAOimpl.class -------------------------------------------------------------------------------- /Students/build/classes/service/impl/TestStudentsDAOimpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/service/impl/TestStudentsDAOimpl.class -------------------------------------------------------------------------------- /Students/build/classes/service/impl/TestUsersDAOimpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/service/impl/TestUsersDAOimpl.class -------------------------------------------------------------------------------- /Students/build/classes/service/impl/UserDAOimpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/Students/build/classes/service/impl/UserDAOimpl.class -------------------------------------------------------------------------------- /Students/build/classes/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | /users/Users_login_success.jsp 13 | /users/Users_login.jsp 14 | /users/Users_login.jsp 15 | 16 | /users/Users_login.jsp 17 | 18 | 19 | 20 | 21 | 22 | 23 | /students/Students_query_success.jsp 24 | 25 | Students_query 26 | 27 | /students/Students_modify.jsp 28 | /students/Students_modify_success.jsp 29 | /students/Students_add_success.jsp 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Students/src/action/StudentsAction.java: -------------------------------------------------------------------------------- 1 | package action; 2 | import service.StudentsDAO; 3 | 4 | 5 | import service.impl.StudentDAOimpl; 6 | 7 | import java.text.ParseException; 8 | import java.text.SimpleDateFormat; 9 | import java.util.List; 10 | 11 | import entity.Students; 12 | /** 13 | * 学生Action类 14 | * @author LvChaoZhang 15 | * 16 | */ 17 | public class StudentsAction extends SuperAction { 18 | 19 | /** 20 | * 21 | */ 22 | private static final long serialVersionUID = 2L; 23 | 24 | //查询所有学生的动作 25 | public String query() 26 | { 27 | //学生接口的引用 28 | StudentsDAO sdao = new StudentDAOimpl(); 29 | //返回一个学生的集合 30 | List list =sdao.queryAllStudents(); 31 | //将返回的集合放进session中 32 | if (list != null || list.size()>0){ 33 | session.setAttribute("students_list", list); 34 | } 35 | return "query_success"; 36 | } 37 | //删除学生的动作 38 | public String delete() 39 | { 40 | //学生业务逻辑类实现的对象 41 | StudentsDAO sdao= new StudentDAOimpl(); 42 | //获得学生的sid号 43 | String sid = request.getParameter("sid"); 44 | //调用删除方法,删除学生 45 | sdao.deleteStudents(sid); 46 | //调用一个视图 47 | return "delete_success"; 48 | 49 | } 50 | //修改学生资料动作 51 | public String modify() throws Exception 52 | { 53 | //获得界面传过来的学生sid编号 54 | String sid = request.getParameter("sid"); 55 | //获得学生实现类 56 | StudentsDAO sdao = new StudentDAOimpl(); 57 | 58 | Students s = sdao.queryStudentsBySid(sid); 59 | //保存到会话中 60 | session.setAttribute("modify_students", s); 61 | return "modify_success"; 62 | } 63 | 64 | //添加和保存是不同的操作,针对修改来说 65 | public String add () throws Exception 66 | { 67 | Students s = new Students(); 68 | s.setSname(request.getParameter("sname")); 69 | s.setGender(request.getParameter("gender")); 70 | s.setAddress(request.getParameter("address")); 71 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 72 | s.setBirthday(sdf.parse(request.getParameter("birthday"))); 73 | StudentsDAO sdao = new StudentDAOimpl(); 74 | sdao.addStudents(s); 75 | return "add_success"; 76 | } 77 | //保存修改后的学生资料动作 78 | public String save() throws Exception 79 | { 80 | //获得一个学生信息 81 | Students s = new Students(); 82 | //获得学号 83 | s.setSid(request.getParameter("sid")); 84 | System.out.println("测试修改--save()--sid:" + request.getParameter("sid") ); 85 | s.setSname(request.getParameter("sname")); 86 | s.setGender(request.getParameter("gender")); 87 | s.setAddress(request.getParameter("address")); 88 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 89 | s.setBirthday(sdf.parse(request.getParameter("birthday"))); 90 | System.out.println("地址:" + request.getParameter("address")); 91 | StudentsDAO sdao = new StudentDAOimpl(); 92 | sdao.updateStudents(s); 93 | //返回的视图 94 | return "save_success"; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Students/src/action/SuperAction.java: -------------------------------------------------------------------------------- 1 | package action; 2 | 3 | import javax.servlet.ServletContext; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpServletResponse; 6 | import javax.servlet.http.HttpSession; 7 | 8 | import org.apache.struts2.interceptor.ServletRequestAware; 9 | import org.apache.struts2.interceptor.ServletResponseAware; 10 | import org.apache.struts2.util.ServletContextAware; 11 | 12 | import com.opensymphony.xwork2.ActionSupport; 13 | 14 | //所有Acion动作的父类 15 | public class SuperAction extends ActionSupport implements ServletResponseAware, ServletRequestAware, ServletContextAware{ 16 | /** 17 | * 18 | */ 19 | private static final long serialVersionUID = 1L; 20 | /* 21 | * 为了实现Action拓展的过滤器和拦截器功能,需要继承ActionSupport 22 | * 为了方便获得内置对象,分别实现以上三个接口 23 | */ 24 | protected HttpServletRequest request;//请求对象 25 | protected HttpServletResponse response;//响应对象 26 | protected HttpSession session;//会话对象 27 | protected ServletContext application;//全局对象 28 | @Override 29 | public void setServletContext(ServletContext application) { 30 | this.application = application; 31 | } 32 | @Override 33 | public void setServletRequest(HttpServletRequest request) { 34 | this.request = request; 35 | this.session = this.request.getSession(); 36 | } 37 | @Override 38 | public void setServletResponse(HttpServletResponse response) { 39 | this.response = response; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Students/src/action/UsersAction.java: -------------------------------------------------------------------------------- 1 | package action; 2 | 3 | import org.apache.struts2.interceptor.validation.SkipValidation; 4 | 5 | import service.UsersDAO; 6 | import service.impl.UserDAOimpl; 7 | 8 | import com.opensymphony.xwork2.ModelDriven; 9 | 10 | import entity.Users; 11 | 12 | public class UsersAction extends SuperAction implements ModelDriven { 13 | 14 | /** 15 | * 16 | */ 17 | private static final long serialVersionUID = 1L; 18 | /* 19 | * 设计用户Action类,采用模型驱动接收表单数据 20 | * 采用模型驱动不需要用set()和get()方法进行封装 21 | */ 22 | private Users user = new Users(); 23 | 24 | //用户登录动作 25 | public String login() { 26 | UsersDAO uDao = new UserDAOimpl(); 27 | if (uDao.usersLogin(user)) { 28 | //在session中保存登录成功的用户名 29 | session.setAttribute("loginUserName", user.getUsername()); 30 | return "login_success"; 31 | } else { 32 | System.out.println("s"); 33 | return "login_failure"; 34 | } 35 | } 36 | 37 | //用户注销方法 38 | @SkipValidation //调用注销方法时,不调用表单验证 39 | public String logout() { 40 | if(session.getAttribute("loginUserName")!=null) { 41 | session.removeAttribute("loginUserName"); 42 | } 43 | return "logout_success"; 44 | } 45 | 46 | 47 | //重写父类方法,用以登录表单检查 48 | @Override 49 | public void validate() { 50 | //用户名不能为空 51 | if("".equals(user.getUsername().trim())) { 52 | this.addFieldError("usernameError", "用户名不能为空"); 53 | } 54 | //密码不能小于6位 55 | if(user.getPassword().length()<6) { 56 | this.addFieldError("passwordError", "密码长度不少于6位"); 57 | } 58 | } 59 | @Override 60 | public Users getModel() { 61 | return this.user; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /Students/src/db/MyHibernateSessionFactory.java: -------------------------------------------------------------------------------- 1 | package db; 2 | 3 | import org.hibernate.SessionFactory; 4 | import org.hibernate.cfg.Configuration; 5 | import org.hibernate.service.ServiceRegistry; 6 | import org.hibernate.service.ServiceRegistryBuilder; 7 | 8 | public class MyHibernateSessionFactory { 9 | private static SessionFactory sessionFactory;//会话工厂属性 10 | 11 | //构造方法私有化,保证单例模式 12 | private MyHibernateSessionFactory(){ 13 | 14 | } 15 | 16 | // 公有静态方法,获得会话工厂对象 17 | public static SessionFactory getSessionFactory(){ 18 | if(sessionFactory == null){ 19 | Configuration config = new Configuration().configure(); 20 | //Builder->Settings->build 21 | ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry(); 22 | sessionFactory = config.buildSessionFactory(serviceRegistry); 23 | return sessionFactory; 24 | }else{ 25 | return sessionFactory; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Students/src/entity/Students.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Students/src/entity/Students.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | import java.util.Date; 4 | 5 | //学生类 6 | public class Students { 7 | private String sid;//学号 8 | private String sname;//姓名 9 | private String gender;//性别 10 | private Date birthday;//出生日期 11 | private String address;//地址 12 | 13 | public Students() { 14 | 15 | } 16 | 17 | public Students(String sid, String sname, String gender, Date birthday, String address) { 18 | super(); 19 | this.sid = sid; 20 | this.sname = sname; 21 | this.gender = gender; 22 | this.birthday = birthday; 23 | this.address = address; 24 | } 25 | 26 | public String getSid() { 27 | return sid; 28 | } 29 | public void setSid(String sid) { 30 | this.sid = sid; 31 | } 32 | public String getSname() { 33 | return sname; 34 | } 35 | public void setSname(String sname) { 36 | this.sname = sname; 37 | } 38 | public String getGender() { 39 | return gender; 40 | } 41 | public void setGender(String gender) { 42 | this.gender = gender; 43 | } 44 | public Date getBirthday() { 45 | return birthday; 46 | } 47 | public void setBirthday(Date birthday) { 48 | this.birthday = birthday; 49 | } 50 | public String getAddress() { 51 | return address; 52 | } 53 | public void setAddress(String address) { 54 | this.address = address; 55 | } 56 | 57 | @Override 58 | public String toString() { 59 | return "Students [sid=" + sid + ", sname=" + sname + ", gender=" + gender + ", birthday=" + birthday 60 | + ", address=" + address + "]"; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Students/src/entity/Users.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Students/src/entity/Users.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | //用户类 3 | public class Users { 4 | private int uid; 5 | private String username; 6 | private String password; 7 | 8 | public Users() { 9 | 10 | } 11 | public Users(int uid, String username, String password) { 12 | //super(); 13 | this.uid = uid; 14 | this.username = username; 15 | this.password = password; 16 | } 17 | public int getUid() { 18 | return uid; 19 | } 20 | public void setUid(int uid) { 21 | this.uid = uid; 22 | } 23 | public String getUsername() { 24 | return username; 25 | } 26 | public void setUsername(String username) { 27 | this.username = username; 28 | } 29 | public String getPassword() { 30 | return password; 31 | } 32 | public void setPassword(String password) { 33 | this.password = password; 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Students/src/hibernate.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | root 9 | root 10 | 11 | com.mysql.jdbc.Driver 12 | jdbc:mysql:///test?useUnicode=true&characterEncoding=UTF-8 13 | 14 | org.hibernate.dialect.MySQLDialect 15 | true 16 | 17 | true 18 | update 19 | 20 | thread 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Students/src/service/StudentsDAO.java: -------------------------------------------------------------------------------- 1 | package service; 2 | //学生的业务逻辑接口 3 | import java.util.List; 4 | 5 | import entity.Students; 6 | 7 | public interface StudentsDAO { 8 | 9 | //查询所有学生资料 10 | public List queryAllStudents(); 11 | 12 | //根据学生编号查询单个学生资料 13 | public Students queryStudentsBySid(String sid); 14 | 15 | //添加学生资料 16 | public boolean addStudents(Students s); 17 | 18 | //修改学生资料 19 | public boolean updateStudents(Students s); 20 | 21 | //删除学生资料 22 | public boolean deleteStudents(String sid); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Students/src/service/UsersDAO.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import entity.Users; 4 | 5 | public interface UsersDAO { 6 | //用户登录方法 7 | public boolean usersLogin(Users u); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /Students/src/service/impl/StudentDAOimpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | /** 3 | * 学生业务逻辑接口实现类 4 | */ 5 | import java.util.List; 6 | 7 | import org.hibernate.Query; 8 | import org.hibernate.Session; 9 | import org.hibernate.Transaction; 10 | 11 | import db.MyHibernateSessionFactory; 12 | import entity.Students; 13 | import service.StudentsDAO; 14 | 15 | public class StudentDAOimpl implements StudentsDAO { 16 | //无参的构造方法 17 | public StudentDAOimpl(){ 18 | 19 | } 20 | //查询所有学生资料 21 | @Override 22 | public List queryAllStudents() { 23 | //创建事务对象 24 | Transaction tx = null; 25 | //学生集合 26 | List list = null; 27 | //hql语句 28 | String hql = ""; 29 | try{ 30 | //首先获得一个session会话对象 31 | Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession(); 32 | //开启session事务 33 | tx = session.beginTransaction(); 34 | //hql语句 35 | hql = "from Students"; 36 | //执行hql语句 37 | Query query = session.createQuery(hql); 38 | //获得返回的结果集 39 | list = query.list(); 40 | //提交事务 41 | tx.commit(); 42 | return list; 43 | } catch(Exception ex){ 44 | ex.printStackTrace(); 45 | //提交事务 46 | tx.commit(); 47 | return list; 48 | } finally { 49 | if (tx != null){ 50 | tx = null; 51 | System.out.println("事务置空"); 52 | } 53 | } 54 | } 55 | //显示单个学生的信息 56 | @Override 57 | public Students queryStudentsBySid(String sid) { 58 | //获得一个session对象 59 | Transaction tx = null; 60 | //单个学生对象 61 | Students s = null; 62 | try{ 63 | //获得一个session会话 64 | Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession(); 65 | //开启事务 66 | tx = session.beginTransaction(); 67 | //获得学生信息 68 | s = (Students) session.get(Students.class, sid); 69 | //提交事务 70 | tx.commit(); 71 | return s; 72 | } catch (Exception ex){ 73 | ex.printStackTrace(); 74 | tx.commit(); 75 | return s; 76 | } finally { 77 | if (tx != null){ 78 | tx = null; 79 | } 80 | } 81 | } 82 | //添加学生的方法 83 | @Override 84 | public boolean addStudents(Students s) { 85 | //生成添加学生的学号 86 | s.setSid(getNewSid()); 87 | //生成一个事物对象 88 | Transaction tx = null; 89 | try{ 90 | //获得一个session会话 91 | Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession(); 92 | //开启事务 93 | tx = session.beginTransaction(); 94 | session.save(s); 95 | //提交事务 96 | tx.commit(); 97 | return true; 98 | } catch (Exception ex){ 99 | ex.printStackTrace(); 100 | tx.commit(); 101 | return false; 102 | } finally { 103 | if (tx != null){ 104 | tx = null; 105 | } 106 | } 107 | } 108 | 109 | //保存学生信息 110 | @Override 111 | public boolean updateStudents(Students s) { 112 | //获得事务对象 113 | Transaction tx = null; 114 | try{ 115 | //获得一个会话对象 116 | Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession(); 117 | //开启一个事务 118 | tx = session.beginTransaction(); 119 | session.update(s); 120 | tx.commit();//要记得提交事务啊,不然写到数据库里面去 121 | return true; 122 | } catch (Exception ex){ 123 | ex.printStackTrace(); 124 | //提交事务 125 | tx.commit(); 126 | return false; 127 | } finally { 128 | if (tx != null){ 129 | tx = null; 130 | } 131 | } 132 | } 133 | 134 | //删除单个学生的方法 135 | @Override 136 | public boolean deleteStudents(String sid) { 137 | //生成事务对象 138 | Transaction tx = null; 139 | try { 140 | //获得一个会话对象 141 | Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession(); 142 | //开启事务 143 | tx = session.beginTransaction(); 144 | //获得一个学生对象 145 | Students s = (Students) session.get(Students.class, sid); 146 | session.delete(s); 147 | //提交事务 148 | tx.commit(); 149 | return true; 150 | } catch (Exception ex) { 151 | //打印异常 152 | ex.printStackTrace(); 153 | return false; 154 | } finally { 155 | if (tx != null){ 156 | tx = null; 157 | } 158 | } 159 | } 160 | 161 | //生成学生的学号 162 | public String getNewSid(){ 163 | //生成一个事务对象 164 | Transaction tx = null; 165 | //hql语句 166 | String hql = ""; 167 | //要生成的学生的编号 168 | String sid = null; 169 | try { 170 | //获得一个session 171 | Session session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession(); 172 | //开启session的事务 173 | tx = session.beginTransaction(); 174 | //获得当前学生列表中最大的学生编号 175 | hql = "select max(sid) from Students"; 176 | //获得一个query对象 177 | Query query = session.createQuery(hql); 178 | //获得唯一条记录 179 | sid = (String) query.uniqueResult(); 180 | //判断一下sid,说明数据库的学生表没有任何记录,给一个默认的最大编号 181 | if (sid == null || "".equals(sid)){ 182 | sid = "S0000001"; 183 | } else { 184 | //已经找到了最大值 185 | //去掉第一个字母s,只取最后7位 186 | String temp = sid.substring(1); 187 | //字符串转成数字 188 | int i = Integer.parseInt(temp); 189 | //生成新的编号的后7位 190 | i++; 191 | //再还原成字符串 192 | temp = String.valueOf(i); 193 | //获得一下长度 194 | int len = temp.length(); 195 | //凑成7位字符串 196 | for (int j = 0; j < 7-len; j++){ 197 | temp = "0" + temp; 198 | } 199 | sid = "S" + temp; 200 | } 201 | //提交事务 202 | tx.commit(); 203 | return sid; 204 | } catch (Exception ex) { 205 | ex.printStackTrace(); 206 | tx.commit(); 207 | return sid; 208 | } finally { 209 | if (tx != null){ 210 | //关闭事务 211 | tx = null; 212 | } 213 | } 214 | } 215 | 216 | } 217 | -------------------------------------------------------------------------------- /Students/src/service/impl/UserDAOimpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.hibernate.Query; 6 | import org.hibernate.Session; 7 | import org.hibernate.Transaction; 8 | 9 | import db.MyHibernateSessionFactory; 10 | import entity.Users; 11 | import service.UsersDAO; 12 | 13 | 14 | 15 | 16 | public class UserDAOimpl implements UsersDAO { 17 | 18 | @Override 19 | public boolean usersLogin(Users u) { 20 | //事物对象 21 | Transaction tx=null; 22 | String hql=""; 23 | try { 24 | Session session=MyHibernateSessionFactory.getSessionFactory().getCurrentSession();//获得一个会话对象 25 | tx = session.beginTransaction();//开启事务 26 | hql="from Users where username=? and password=?"; 27 | Query query = session.createQuery(hql); 28 | query.setParameter(0, u.getUsername()); 29 | query.setParameter(1, u.getPassword()); 30 | List list = query.list(); 31 | tx.commit();//提交事务 32 | if ( list.size() > 0 ){ 33 | System.out.println("1"); 34 | return true; 35 | }else{ 36 | System.out.println("2"); 37 | return false; 38 | } 39 | } catch (Exception e) { 40 | e.printStackTrace(); 41 | return false; 42 | }finally { 43 | if(tx!=null) { 44 | tx=null; 45 | System.out.println("3"); 46 | } 47 | } 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Students/src/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | /users/Users_login_success.jsp 13 | /users/Users_login.jsp 14 | /users/Users_login.jsp 15 | 16 | /users/Users_login.jsp 17 | 18 | 19 | 20 | 21 | 22 | 23 | /students/Students_query_success.jsp 24 | 25 | Students_query 26 | 27 | /students/Students_modify.jsp 28 | /students/Students_modify_success.jsp 29 | /students/Students_add_success.jsp 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Students/test/entity/TestStudents.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | import java.util.Date; 4 | 5 | import org.hibernate.Session; 6 | import org.hibernate.SessionFactory; 7 | import org.hibernate.Transaction; 8 | import org.hibernate.cfg.Configuration; 9 | import org.hibernate.service.ServiceRegistry; 10 | import org.hibernate.service.ServiceRegistryBuilder; 11 | import org.hibernate.tool.hbm2ddl.SchemaExport; 12 | import org.junit.Test; 13 | 14 | public class TestStudents { 15 | @Test 16 | public void testSchemaExport() 17 | { 18 | //创建配置对象 19 | Configuration config = new Configuration().configure(); 20 | //创建服务注册对象 21 | ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry(); 22 | //创建sessionFactory 23 | SessionFactory sessionFactory = config.buildSessionFactory(serviceRegistry); 24 | //创建SESSION对象 25 | Session session = sessionFactory.getCurrentSession(); 26 | //创建SchemaExporT对象 27 | SchemaExport export = new SchemaExport(config); 28 | export.create(true, true); 29 | } 30 | //添加测试数据 31 | @Test 32 | public void testStudentsSave() 33 | { 34 | //创建配置对象 35 | Configuration config = new Configuration().configure(); 36 | //创建服务注册对象 37 | ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry(); 38 | //创建sessionFactory 39 | SessionFactory sessionFactory = config.buildSessionFactory(serviceRegistry); 40 | //创建SESSION对象 41 | Session session = sessionFactory.getCurrentSession(); 42 | //创建事务对象 43 | Transaction tx ; 44 | //开启事务 45 | tx = session.beginTransaction(); 46 | Students s1 = new Students("S0000001", "张三丰", "男", new Date(), "武当山"); 47 | Students s2 = new Students("S0000002", "郭靖", "男", new Date(), "桃花岛"); 48 | Students s3 = new Students("S0000003", "黄蓉", "女", new Date(), "桃花岛"); 49 | session.save(s1); 50 | session.save(s2); 51 | session.save(s3); 52 | //提交事务 53 | tx.commit(); 54 | sessionFactory.close(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Students/test/service/impl/TestStudentsDAOimpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | import entity.Students; 7 | import service.StudentsDAO; 8 | import service.impl.StudentDAOimpl; 9 | 10 | import java.util.Date; 11 | import java.util.List; 12 | public class TestStudentsDAOimpl { 13 | 14 | //测试查询所有学生的方法 15 | @Test 16 | public void testQueryAllStudents() 17 | { 18 | StudentsDAO sdao = new StudentDAOimpl(); 19 | List list = sdao.queryAllStudents(); 20 | //遍历集合 21 | for(int i= 0;i'; 131 | } 132 | if (node.url) { 133 | str += ''; 143 | str += node.name; 144 | if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; 145 | str += ''; 146 | if (node._hc) { 147 | str += '
'; 148 | str += this.addNode(node); 149 | str += '
'; 150 | } 151 | this.aIndent.pop(); 152 | return str; 153 | }; 154 | 155 | // Adds the empty and line icons 156 | dTree.prototype.indent = function(node, nodeId) { 157 | var str = ''; 158 | if (this.root.id != node.pid) { 159 | for (var n=0; n'; 161 | (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); 162 | if (node._hc) { 163 | str += ''; 167 | } else str += ''; 168 | } 169 | return str; 170 | }; 171 | 172 | // Checks if a node has any children and if it is the last sibling 173 | dTree.prototype.setCS = function(node) { 174 | var lastId; 175 | for (var n=0; n 4 | // 交易查询: 从 5 | // 7 | // 8 | // 至 9 | // 11 | // 12 | 13 | // 14 | 15 | '); 367 | __ci.document.writeln('<\/style>'); 368 | __ci.document.writeln('<\/head>'); 369 | __ci.document.writeln(''); 370 | __ci.document.writeln('<\/body>'); 371 | __ci.document.writeln('<\/html>'); 372 | __ci.document.close(); 373 | document.writeln('<\/div>'); 374 | var calendar = new Calendar(); 375 | //--> -------------------------------------------------------------------------------- /前端素材/sql/test.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat MySQL Data Transfer 3 | 4 | Source Server : Mysql60 5 | Source Server Version : 60011 6 | Source Host : localhost:3306 7 | Source Database : test 8 | 9 | Target Server Type : MYSQL 10 | Target Server Version : 60011 11 | File Encoding : 65001 12 | 13 | Date: 2015-07-19 10:48:00 14 | */ 15 | 16 | SET FOREIGN_KEY_CHECKS=0; 17 | 18 | -- ---------------------------- 19 | -- Table structure for students 20 | -- ---------------------------- 21 | DROP TABLE IF EXISTS `students`; 22 | CREATE TABLE `students` ( 23 | `sid` varchar(8) NOT NULL, 24 | `sname` varchar(255) DEFAULT NULL, 25 | `gender` varchar(255) DEFAULT NULL, 26 | `birthday` date DEFAULT NULL, 27 | `address` varchar(255) DEFAULT NULL, 28 | PRIMARY KEY (`sid`) 29 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 30 | 31 | -- ---------------------------- 32 | -- Records of students 33 | -- ---------------------------- 34 | INSERT INTO `students` VALUES ('S0000001', '张三丰', '男', '2015-06-24', '武当山'); 35 | INSERT INTO `students` VALUES ('S0000002', '张无忌', '男', '2015-06-24', '武当山'); 36 | INSERT INTO `students` VALUES ('S0000004', '李白', '女', '2015-06-06', '西安长安区'); 37 | 38 | -- ---------------------------- 39 | -- Table structure for users 40 | -- ---------------------------- 41 | DROP TABLE IF EXISTS `users`; 42 | CREATE TABLE `users` ( 43 | `uid` int(11) NOT NULL AUTO_INCREMENT, 44 | `username` varchar(255) DEFAULT NULL, 45 | `password` varchar(255) DEFAULT NULL, 46 | PRIMARY KEY (`uid`) 47 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 48 | 49 | -- ---------------------------- 50 | -- Records of users 51 | -- ---------------------------- 52 | INSERT INTO `users` VALUES ('1', 'zhangsan', '123456'); 53 | 54 | -- ---------------------------- 55 | -- Procedure structure for myproc 56 | -- ---------------------------- 57 | DROP PROCEDURE IF EXISTS `myproc`; 58 | DELIMITER ;; 59 | CREATE DEFINER=`root`@`localhost` PROCEDURE `myproc`(OUT s int) 60 | BEGIN 61 | select COUNT(*) into s from users; 62 | END 63 | ;; 64 | DELIMITER ; 65 | 66 | -- ---------------------------- 67 | -- Procedure structure for myproc2 68 | -- ---------------------------- 69 | DROP PROCEDURE IF EXISTS `myproc2`; 70 | DELIMITER ;; 71 | CREATE DEFINER=`root`@`localhost` PROCEDURE `myproc2`(IN num int) 72 | BEGIN 73 | SELECT num; 74 | SET num=num+1; 75 | SELECT num; 76 | END 77 | ;; 78 | DELIMITER ; 79 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | response.sendRedirect(path+"/users/Users_login.jsp"); 6 | %> 7 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/students/Students_add.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 78 | 79 | 80 | 81 | 87 |
88 |
89 |
90 | 91 | 添加学生资料 92 |
93 |
94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 |
姓名:
性别:
出生日期: 108 |
地址:
118 |
119 | 120 | 121 |
122 | 123 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/students/Students_add_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 78 | 79 | 86 |
87 | 88 |
89 |
90 | 添加成功,继续添加? 91 | 92 |
93 | 94 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/students/Students_modify.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 78 | 79 | 80 | 81 | 87 |
88 |
89 |
90 | 91 | 修改学生资料 92 |
93 |
94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 117 | 118 | 119 | 120 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 |
学号:
姓名:
性别: 108 | 109 | 男 110 | 女 111 | 112 | 113 | 男 114 | 女 115 | 116 |
出生日期:" 123 | /> 124 |
地址:
134 |
135 | 136 | 137 |
138 | 139 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/students/Students_modify_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 78 | 79 | 86 |
87 | 88 |
89 |
90 | 修改成功,返回学生列表 91 | 92 |
93 | 94 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/students/Students_query_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 79 | 80 | 86 |
87 |
88 |
89 | 添加学生 90 |
91 |
92 | 查找学生 93 |
94 |
95 |
96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
学号姓名性别出生日期地址操作
">" onclick="javascript: return confirm('真的要删除吗?');">删除
128 |
129 | 130 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/tree.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 导航树 10 | 11 | 12 | 13 | 14 | 15 | 16 | 29 | 55 | 59 |
60 | 102 |
103 | 104 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/users/Users_login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <%@ taglib prefix="s" uri="/struts-tags"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 用户登录 13 | 14 | 15 | 229 | 230 |
231 | 238 |
239 |
240 |
241 |
242 |
243 |
244 | 270 |
271 |
272 |
273 | 276 |
277 | 278 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/users/Users_login_main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 78 | 79 | 82 |
83 | 84 |
85 |
86 | 87 | 88 |
89 | 90 | -------------------------------------------------------------------------------- /前端素材/所有的jsp文件/users/Users_login_success.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 后台管理 11 | 12 | 13 | 14 | 15 |
16 | 36 | 39 |
40 | 41 |
42 | 43 |
44 | 45 | 57 | -------------------------------------------------------------------------------- /文档/Structs+Hibernate4开发学生信息管理功能--(一)环境搭建.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/文档/Structs+Hibernate4开发学生信息管理功能--(一)环境搭建.doc -------------------------------------------------------------------------------- /文档/Struts2+Hibernate4开发学生信息管理功能--(三)用户登录模块.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/文档/Struts2+Hibernate4开发学生信息管理功能--(三)用户登录模块.doc -------------------------------------------------------------------------------- /文档/Struts2+Hibernate4开发学生信息管理功能--(二)Struts2和Hibernate整合.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/文档/Struts2+Hibernate4开发学生信息管理功能--(二)Struts2和Hibernate整合.doc -------------------------------------------------------------------------------- /文档/Struts2+Hibernate4开发学生信息管理功能--(四)学生信息管理模块.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodingChaozhang/The-System-of-Students/4f05cb897fac73425816ebeba47ac85b876d5eb5/文档/Struts2+Hibernate4开发学生信息管理功能--(四)学生信息管理模块.doc --------------------------------------------------------------------------------