…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});
--------------------------------------------------------------------------------
/WebRoot/lib/layui/lay/modules/laytpl.js:
--------------------------------------------------------------------------------
1 | /** layui-v2.4.5 MIT License By https://www.layui.com */
2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});
--------------------------------------------------------------------------------
/WebRoot/lib/layui/lay/modules/rate.js:
--------------------------------------------------------------------------------
1 | /** layui-v2.4.5 MIT License By https://www.layui.com */
2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='",u=1;u<=i.length;u++){var r=' ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+' ":n+=r}n+="
"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});
--------------------------------------------------------------------------------
/WebRoot/lib/layui/lay/modules/tree.js:
--------------------------------------------------------------------------------
1 | /** layui-v2.4.5 MIT License By https://www.layui.com */
2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o(''),s=o(["",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),""].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o(''));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});
--------------------------------------------------------------------------------
/WebRoot/lib/layui/lay/modules/upload.js:
--------------------------------------------------------------------------------
1 | /** layui-v2.4.5 MIT License By https://www.layui.com */
2 | ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap(''),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['"].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)});
--------------------------------------------------------------------------------
/WebRoot/lib/layui/lay/modules/util.js:
--------------------------------------------------------------------------------
1 | /** layui-v2.4.5 MIT License By https://www.layui.com */
2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['',t.bar1?'- '+c[0]+"
":"",t.bar2?'- '+c[1]+"
":"",'- '+c[2]+"
","
"].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)});
--------------------------------------------------------------------------------
/WebRoot/lib/layui/layui.js:
--------------------------------------------------------------------------------
1 | /** layui-v2.4.5 MIT License By https://www.layui.com */
2 | ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
4 |
5 |
6 |
7 |
8 | 后台登录-X-admin2.2
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
x-admin2.0-管理登录
26 |
27 |
28 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/WebRoot/studentChengjiList.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
55 |
56 |
71 |
72 |
--------------------------------------------------------------------------------
/WebRoot/studentlist.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
73 |
74 |
89 |
90 |
--------------------------------------------------------------------------------
/WebRoot/teacherlist.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
70 |
71 |
86 |
87 |
--------------------------------------------------------------------------------
/WebRoot/upStudent.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 | 欢迎页面-X-admin2.2
10 |
11 |
12 |
14 |
15 |
16 |
18 |
19 |
20 |
24 |
25 |
26 |
104 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/WebRoot/upTeacher.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 | 欢迎页面-X-admin2.2
10 |
11 |
12 |
14 |
15 |
16 |
18 |
19 |
20 |
24 |
25 |
26 |
96 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/WebRoot/upchengji.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 | 欢迎页面-X-admin2.2
10 |
11 |
12 |
14 |
15 |
16 |
18 |
19 |
20 |
24 |
25 |
26 |
52 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/WebRoot/upclasss.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 | 欢迎页面-X-admin2.2
10 |
11 |
12 |
14 |
15 |
16 |
18 |
19 |
20 |
24 |
25 |
26 |
53 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/WebRoot/upkecheng.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 |
5 |
6 |
7 |
8 |
9 | 欢迎页面-X-admin2.2
10 |
11 |
12 |
14 |
15 |
16 |
18 |
19 |
20 |
24 |
25 |
26 |
53 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/WebRoot/welcome.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 欢迎页面-X-admin2.2
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 欢迎使用学生管理系统:当前时间:
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 系统名称 |
41 | 学生信息管理系统 |
42 |
43 |
44 | 系统版本 |
45 | 1.0 |
46 |
47 |
48 | 服务器地址 |
49 | http://localhost:8080/StudentSystem-JSP-Servlet/login.jsp |
50 |
51 |
52 | 操作系统 |
53 | Windows |
54 |
55 |
56 | 运行环境 |
57 | ApacheTomCat8.5/JDK10/ |
58 |
59 |
60 | 运用技术 |
61 | Servlet+JSP+JSTL |
62 |
63 |
64 | MYSQL版本 |
65 | 5.5.53 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/dao/ChengjiDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/dao/ChengjiDao.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/dao/ClasssDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/dao/ClasssDao.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/dao/KechengDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/dao/KechengDao.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/dao/StudentDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/dao/StudentDao.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/dao/TeacherDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/dao/TeacherDao.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/daoimp/ChengjiDaoImp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/daoimp/ChengjiDaoImp.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/daoimp/ClasssDaoImp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/daoimp/ClasssDaoImp.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/daoimp/KechengDaoImp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/daoimp/KechengDaoImp.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/daoimp/StudentDaoImo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/daoimp/StudentDaoImo.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/daoimp/TeacherDaoImo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/daoimp/TeacherDaoImo.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/filter/LoginFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/filter/LoginFilter.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/model/Chengji.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/model/Chengji.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/model/Classs.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/model/Classs.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/model/Kecheng.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/model/Kecheng.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/model/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/model/Student.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/model/Teacher.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/model/Teacher.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/AddChengji.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/AddChengji.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/AddClasss.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/AddClasss.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/AddKecheng.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/AddKecheng.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/AddStudentServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/AddStudentServlet.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/AddTeacherServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/AddTeacherServlet.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/ClasssList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/ClasssList.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/DelChengji.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/DelChengji.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/DelClasss.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/DelClasss.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/DelKecheng.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/DelKecheng.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/DelStudent.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/DelStudent.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/DelTeacher.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/DelTeacher.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/Errorer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/Errorer.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/ExitLogin.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/ExitLogin.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindAllClasssName.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindAllClasssName.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindAllClasssNameByUp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindAllClasssNameByUp.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindAllKechnegName.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindAllKechnegName.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindAllKechnegNameByTeacher.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindAllKechnegNameByTeacher.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindAllKechnegNameByUpTeacher.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindAllKechnegNameByUpTeacher.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindChengjiById.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindChengjiById.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindClasssById.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindClasssById.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindKechengById.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindKechengById.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindStudentByID.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindStudentByID.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindStudentByname.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindStudentByname.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindStudentChengji.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindStudentChengji.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindTeacherByID.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindTeacherByID.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/FindTeacherByname.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/FindTeacherByname.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/KechengList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/KechengList.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/LoginServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/LoginServlet.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/StudentList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/StudentList.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/TeacherList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/TeacherList.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/UpChengji.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/UpChengji.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/UpClasss.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/UpClasss.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/UpKecheng.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/UpKecheng.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/UpStudent.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/UpStudent.class
--------------------------------------------------------------------------------
/build/classes/com/yzk/student/servlet/UpTeacher.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/build/classes/com/yzk/student/servlet/UpTeacher.class
--------------------------------------------------------------------------------
/src/com/yzk/student/dao/ChengjiDao.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.yzk.student.model.Chengji;
6 |
7 | public interface ChengjiDao {
8 |
9 | int insert(Chengji classs);
10 |
11 | int delete(int id);
12 |
13 | int update(Chengji classs);
14 |
15 | List selectByName(String name);
16 |
17 | Chengji selectById(int id);
18 |
19 | List selectAll();
20 | }
--------------------------------------------------------------------------------
/src/com/yzk/student/dao/ClasssDao.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.yzk.student.model.Classs;
6 |
7 | public interface ClasssDao {
8 |
9 | int insert(Classs classs);
10 |
11 | int delete(int id);
12 |
13 | int update(Classs classs);
14 |
15 | List selectByName(String name);
16 |
17 | Classs selectById(int id);
18 |
19 | List selectAll();
20 | }
--------------------------------------------------------------------------------
/src/com/yzk/student/dao/KechengDao.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.yzk.student.model.Kecheng;
6 |
7 | public interface KechengDao {
8 |
9 | int insert(Kecheng temp);
10 |
11 | int delete(int id);
12 |
13 | int update(Kecheng temp);
14 |
15 | List selectByName(String name);
16 |
17 | Kecheng selectById(int id);
18 |
19 | List selectAll();
20 | }
--------------------------------------------------------------------------------
/src/com/yzk/student/dao/StudentDao.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.yzk.student.model.Student;
6 |
7 | public interface StudentDao {
8 |
9 | int insertStudent(Student student);
10 |
11 | int deleteStudent(int id);
12 |
13 | int updateStudent(Student student);
14 |
15 | List selectStudentByName(String name);
16 |
17 | Student selectStudentById(int id);
18 |
19 | List selectAllStudent();
20 |
21 | void delclass(int id);
22 | }
--------------------------------------------------------------------------------
/src/com/yzk/student/dao/TeacherDao.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.dao;
2 |
3 | import java.util.List;
4 |
5 | import com.yzk.student.model.Teacher;
6 |
7 | public interface TeacherDao {
8 |
9 | int insertTeacher(Teacher teacher);
10 |
11 | int deleteTeacher(int id);
12 |
13 | int updateTeacher(Teacher teacher);
14 |
15 | List selectTeacherByName(String name);
16 |
17 | Teacher selectTeacherById(int id);
18 |
19 | List selectAllTeacher();
20 | void delkecheng(int id);
21 | }
--------------------------------------------------------------------------------
/src/com/yzk/student/daoimp/ChengjiDaoImp.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.daoimp;
2 |
3 | import java.sql.Connection;
4 | import java.sql.DriverManager;
5 | import java.sql.PreparedStatement;
6 | import java.sql.ResultSet;
7 | import java.sql.SQLException;
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | import com.yzk.student.dao.ChengjiDao;
12 | import com.yzk.student.model.Chengji;
13 |
14 | public class ChengjiDaoImp implements ChengjiDao {
15 | private final String jdbcDriver = "com.mysql.cj.jdbc.Driver";
16 | private final String url = "jdbc:mysql://localhost:3306/StudentSystem-JSP-Servlet?serverTimezone=UTC";
17 | private final String userName = "root";
18 | private final String password = "root";
19 |
20 | @Override
21 | public int insert(Chengji temp) {
22 | int n = 0;
23 | String sql = "insert into Chengji values (default,?,?,?,?)";
24 | Connection conn = null;
25 | PreparedStatement ps = null;
26 | try {
27 | Class.forName(jdbcDriver);
28 | conn = DriverManager.getConnection(url, userName, password);
29 | ps = conn.prepareStatement(sql);
30 | ps.setInt(1, temp.getSid());
31 | ps.setString(2, temp.getKname());
32 | ps.setString(3, temp.getFenshu());
33 | ps.setString(4, temp.getTeacher());
34 | n = ps.executeUpdate();
35 | } catch (ClassNotFoundException e) {
36 | e.printStackTrace();
37 | } catch (SQLException e) {
38 | e.printStackTrace();
39 | } finally { // �ر����ݿ���Դ
40 | try {
41 | if (null != ps) {
42 | ps.close();
43 | }
44 | } catch (SQLException e) {
45 | e.printStackTrace();
46 | }
47 | try {
48 | if (null != conn) {
49 | conn.close();
50 | }
51 | } catch (SQLException e) {
52 | e.printStackTrace();
53 | }
54 | }
55 | return n;
56 | }
57 |
58 | @Override
59 | public int delete(int id) {
60 | String sql = "delete from chengji where id=?";
61 | int n = 0;
62 | Connection conn = null;
63 | PreparedStatement ps = null;
64 |
65 | try {
66 | Class.forName(jdbcDriver);
67 | conn = DriverManager.getConnection(url, userName, password);
68 | ps = conn.prepareStatement(sql);
69 | ps.setInt(1, id);
70 | n = ps.executeUpdate();
71 | } catch (ClassNotFoundException e) {
72 | e.printStackTrace();
73 | } catch (SQLException e) {
74 | e.printStackTrace();
75 | } finally {
76 | try {
77 | if (null != ps) {
78 | ps.close();
79 | }
80 | } catch (SQLException e) {
81 | e.printStackTrace();
82 | }
83 | try {
84 | if (null != conn) {
85 | conn.close();
86 | }
87 | } catch (SQLException e) {
88 | e.printStackTrace();
89 | }
90 | }
91 |
92 | return n;
93 | }
94 |
95 | @Override
96 | public int update(Chengji kecheng) {
97 | String sql = "update chengji set fenshu=? where id=?";
98 | int n = 0;
99 | Connection conn = null;
100 | PreparedStatement ps = null;
101 | try {
102 | Class.forName(jdbcDriver);
103 | conn = DriverManager.getConnection(url, userName, password);
104 | ps = conn.prepareStatement(sql);
105 | ps.setString(1, kecheng.getFenshu());
106 | ps.setInt(2, kecheng.getId());
107 | n = ps.executeUpdate();
108 | } catch (ClassNotFoundException e) {
109 | e.printStackTrace();
110 | } catch (SQLException e) {
111 | e.printStackTrace();
112 | } finally {
113 | try {
114 | if (null != ps) {
115 | ps.close();
116 | }
117 | } catch (SQLException e) {
118 | e.printStackTrace();
119 | }
120 | try {
121 | if (null != conn) {
122 | conn.close();
123 | }
124 | } catch (SQLException e) {
125 | e.printStackTrace();
126 | }
127 | }
128 | return n;
129 | }
130 |
131 | @Override
132 | public List selectByName(String name) {
133 | return null;
134 | }
135 |
136 | @Override
137 | public Chengji selectById(int id) {
138 | for (Chengji classs : selectAll()) {
139 | if (classs.getId() == id) {
140 | return classs;
141 | }
142 | }
143 | return null;
144 | }
145 |
146 | @Override
147 | public List selectAll() {
148 | String sql = "select * from Chengji";
149 | List list = new ArrayList<>();
150 | Connection conn = null;
151 | PreparedStatement ps = null;
152 | ResultSet rs = null;
153 |
154 | try {
155 | Class.forName(jdbcDriver);
156 | conn = DriverManager.getConnection(url, userName, password);
157 | ps = conn.prepareStatement(sql);
158 | rs = ps.executeQuery();
159 | while (rs.next()) {
160 | Chengji classs = new Chengji(rs.getInt("id"), rs.getInt("sid"), rs.getString("kname"),
161 | rs.getString("fenshu"),rs.getString("teacher"));
162 | list.add(classs);
163 | }
164 |
165 | } catch (ClassNotFoundException e) {
166 | e.printStackTrace();
167 | } catch (SQLException e) {
168 | e.printStackTrace();
169 | } finally {
170 | try {
171 | if (null != ps) {
172 | ps.close();
173 | }
174 | } catch (SQLException e) {
175 | e.printStackTrace();
176 | }
177 | try {
178 | if (null != conn) {
179 | conn.close();
180 | }
181 | } catch (SQLException e) {
182 | e.printStackTrace();
183 | }
184 | }
185 |
186 | return list;
187 | }
188 |
189 | }
190 |
--------------------------------------------------------------------------------
/src/com/yzk/student/daoimp/ClasssDaoImp.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.daoimp;
2 |
3 | import java.sql.Connection;
4 | import java.sql.DriverManager;
5 | import java.sql.PreparedStatement;
6 | import java.sql.ResultSet;
7 | import java.sql.SQLException;
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | import com.yzk.student.dao.ClasssDao;
12 | import com.yzk.student.model.Classs;
13 |
14 | public class ClasssDaoImp implements ClasssDao {
15 | private final String jdbcDriver = "com.mysql.cj.jdbc.Driver";
16 | private final String url = "jdbc:mysql://localhost:3306/StudentSystem-JSP-Servlet?serverTimezone=UTC";
17 | private final String userName = "root";
18 | private final String password = "root";
19 |
20 | @Override
21 | public int insert(Classs classs) {
22 | int n = 0;
23 | String sql = "insert into Classs values (default,?)";
24 | Connection conn = null;
25 | PreparedStatement ps = null;
26 | try {
27 | Class.forName(jdbcDriver);
28 | conn = DriverManager.getConnection(url, userName, password);
29 | ps = conn.prepareStatement(sql);
30 | ps.setString(1, classs.getName());
31 | n = ps.executeUpdate();
32 | } catch (ClassNotFoundException e) {
33 | e.printStackTrace();
34 | } catch (SQLException e) {
35 | e.printStackTrace();
36 | } finally { // �ر����ݿ���Դ
37 | try {
38 | if (null != ps) {
39 | ps.close();
40 | }
41 | } catch (SQLException e) {
42 | e.printStackTrace();
43 | }
44 | try {
45 | if (null != conn) {
46 | conn.close();
47 | }
48 | } catch (SQLException e) {
49 | e.printStackTrace();
50 | }
51 | }
52 | return n;
53 | }
54 |
55 | @Override
56 | public int delete(int id) {
57 | String sql = "delete from Classs where id=?";
58 | int n = 0;
59 | Connection conn = null;
60 | PreparedStatement ps = null;
61 |
62 | try {
63 | Class.forName(jdbcDriver);
64 | conn = DriverManager.getConnection(url, userName, password);
65 | ps = conn.prepareStatement(sql);
66 | ps.setInt(1, id);
67 | n = ps.executeUpdate();
68 | } catch (ClassNotFoundException e) {
69 | e.printStackTrace();
70 | } catch (SQLException e) {
71 | e.printStackTrace();
72 | } finally {
73 | try {
74 | if (null != ps) {
75 | ps.close();
76 | }
77 | } catch (SQLException e) {
78 | e.printStackTrace();
79 | }
80 | try {
81 | if (null != conn) {
82 | conn.close();
83 | }
84 | } catch (SQLException e) {
85 | e.printStackTrace();
86 | }
87 | }
88 |
89 | return n;
90 | }
91 |
92 | @Override
93 | public int update(Classs classs) {
94 | String sql = "update Classs set name=? where id=?";
95 | int n = 0;
96 | Connection conn = null;
97 | PreparedStatement ps = null;
98 | try {
99 | Class.forName(jdbcDriver);
100 | conn = DriverManager.getConnection(url, userName, password);
101 | ps = conn.prepareStatement(sql);
102 | ps.setString(1, classs.getName());
103 | ps.setInt(2, classs.getId());
104 | n = ps.executeUpdate();
105 | } catch (ClassNotFoundException e) {
106 | e.printStackTrace();
107 | } catch (SQLException e) {
108 | e.printStackTrace();
109 | } finally {
110 | try {
111 | if (null != ps) {
112 | ps.close();
113 | }
114 | } catch (SQLException e) {
115 | e.printStackTrace();
116 | }
117 | try {
118 | if (null != conn) {
119 | conn.close();
120 | }
121 | } catch (SQLException e) {
122 | e.printStackTrace();
123 | }
124 | }
125 | return n;
126 | }
127 |
128 | @Override
129 | public List selectByName(String name) {
130 | // TODO Auto-generated method stub
131 | return null;
132 | }
133 |
134 | @Override
135 | public Classs selectById(int id) {
136 | for (Classs classs : selectAll()) {
137 | if (classs.getId() == id) {
138 | return classs;
139 | }
140 | }
141 | return null;
142 | }
143 |
144 | @Override
145 | public List selectAll() {
146 | String sql = "select * from Classs";
147 | List list = new ArrayList<>();
148 | Connection conn = null;
149 | PreparedStatement ps = null;
150 | ResultSet rs = null;
151 |
152 | try {
153 | Class.forName(jdbcDriver);
154 | conn = DriverManager.getConnection(url, userName, password);
155 | ps = conn.prepareStatement(sql);
156 | rs = ps.executeQuery();
157 | while (rs.next()) {
158 | Classs classs = new Classs(rs.getInt("id"), rs.getString("name"));
159 | list.add(classs);
160 | }
161 |
162 | } catch (ClassNotFoundException e) {
163 | e.printStackTrace();
164 | } catch (SQLException e) {
165 | e.printStackTrace();
166 | } finally {
167 | try {
168 | if (null != ps) {
169 | ps.close();
170 | }
171 | } catch (SQLException e) {
172 | e.printStackTrace();
173 | }
174 | try {
175 | if (null != conn) {
176 | conn.close();
177 | }
178 | } catch (SQLException e) {
179 | e.printStackTrace();
180 | }
181 | }
182 |
183 | return list;
184 | }
185 |
186 | }
187 |
--------------------------------------------------------------------------------
/src/com/yzk/student/daoimp/KechengDaoImp.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.daoimp;
2 |
3 | import java.sql.Connection;
4 | import java.sql.DriverManager;
5 | import java.sql.PreparedStatement;
6 | import java.sql.ResultSet;
7 | import java.sql.SQLException;
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | import com.yzk.student.dao.KechengDao;
12 | import com.yzk.student.model.Kecheng;
13 |
14 | public class KechengDaoImp implements KechengDao {
15 | private final String jdbcDriver = "com.mysql.cj.jdbc.Driver";
16 | private final String url = "jdbc:mysql://localhost:3306/StudentSystem-JSP-Servlet?serverTimezone=UTC";
17 | private final String userName = "root";
18 | private final String password = "root";
19 |
20 | @Override
21 | public int insert(Kecheng temp) {
22 | int n = 0;
23 | String sql = "insert into Kecheng values (default,?)";
24 | Connection conn = null;
25 | PreparedStatement ps = null;
26 | try {
27 | Class.forName(jdbcDriver);
28 | conn = DriverManager.getConnection(url, userName, password);
29 | ps = conn.prepareStatement(sql);
30 | ps.setString(1, temp.getName());
31 | n = ps.executeUpdate();
32 | } catch (ClassNotFoundException e) {
33 | e.printStackTrace();
34 | } catch (SQLException e) {
35 | e.printStackTrace();
36 | } finally { // �ر����ݿ���Դ
37 | try {
38 | if (null != ps) {
39 | ps.close();
40 | }
41 | } catch (SQLException e) {
42 | e.printStackTrace();
43 | }
44 | try {
45 | if (null != conn) {
46 | conn.close();
47 | }
48 | } catch (SQLException e) {
49 | e.printStackTrace();
50 | }
51 | }
52 | return n;
53 | }
54 |
55 | @Override
56 | public int delete(int id) {
57 | String sql = "delete from Kecheng where id=?";
58 | int n = 0;
59 | Connection conn = null;
60 | PreparedStatement ps = null;
61 |
62 | try {
63 | Class.forName(jdbcDriver);
64 | conn = DriverManager.getConnection(url, userName, password);
65 | ps = conn.prepareStatement(sql);
66 | ps.setInt(1, id);
67 | n = ps.executeUpdate();
68 | } catch (ClassNotFoundException e) {
69 | e.printStackTrace();
70 | } catch (SQLException e) {
71 | e.printStackTrace();
72 | } finally {
73 | try {
74 | if (null != ps) {
75 | ps.close();
76 | }
77 | } catch (SQLException e) {
78 | e.printStackTrace();
79 | }
80 | try {
81 | if (null != conn) {
82 | conn.close();
83 | }
84 | } catch (SQLException e) {
85 | e.printStackTrace();
86 | }
87 | }
88 |
89 | return n;
90 | }
91 |
92 | @Override
93 | public int update(Kecheng kecheng) {
94 | String sql = "update Kecheng set name=? where id=?";
95 | int n = 0;
96 | Connection conn = null;
97 | PreparedStatement ps = null;
98 | try {
99 | Class.forName(jdbcDriver);
100 | conn = DriverManager.getConnection(url, userName, password);
101 | ps = conn.prepareStatement(sql);
102 | ps.setString(1, kecheng.getName());
103 | ps.setInt(2, kecheng.getId());
104 | n = ps.executeUpdate();
105 | } catch (ClassNotFoundException e) {
106 | e.printStackTrace();
107 | } catch (SQLException e) {
108 | e.printStackTrace();
109 | } finally {
110 | try {
111 | if (null != ps) {
112 | ps.close();
113 | }
114 | } catch (SQLException e) {
115 | e.printStackTrace();
116 | }
117 | try {
118 | if (null != conn) {
119 | conn.close();
120 | }
121 | } catch (SQLException e) {
122 | e.printStackTrace();
123 | }
124 | }
125 | return n;
126 | }
127 |
128 | @Override
129 | public List selectByName(String name) {
130 | return null;
131 | }
132 |
133 | @Override
134 | public Kecheng selectById(int id) {
135 | for (Kecheng classs : selectAll()) {
136 | if (classs.getId() == id) {
137 | return classs;
138 | }
139 | }
140 | return null;
141 | }
142 |
143 | @Override
144 | public List selectAll() {
145 | String sql = "select * from Kecheng";
146 | List list = new ArrayList<>();
147 | Connection conn = null;
148 | PreparedStatement ps = null;
149 | ResultSet rs = null;
150 |
151 | try {
152 | Class.forName(jdbcDriver);
153 | conn = DriverManager.getConnection(url, userName, password);
154 | ps = conn.prepareStatement(sql);
155 | rs = ps.executeQuery();
156 | while (rs.next()) {
157 | Kecheng classs = new Kecheng(rs.getInt("id"), rs.getString("name"));
158 | list.add(classs);
159 | }
160 |
161 | } catch (ClassNotFoundException e) {
162 | e.printStackTrace();
163 | } catch (SQLException e) {
164 | e.printStackTrace();
165 | } finally {
166 | try {
167 | if (null != ps) {
168 | ps.close();
169 | }
170 | } catch (SQLException e) {
171 | e.printStackTrace();
172 | }
173 | try {
174 | if (null != conn) {
175 | conn.close();
176 | }
177 | } catch (SQLException e) {
178 | e.printStackTrace();
179 | }
180 | }
181 |
182 | return list;
183 | }
184 |
185 | }
186 |
--------------------------------------------------------------------------------
/src/com/yzk/student/filter/LoginFilter.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/src/com/yzk/student/filter/LoginFilter.java
--------------------------------------------------------------------------------
/src/com/yzk/student/model/Chengji.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.model;
2 |
3 | public class Chengji {
4 | private int id;
5 | private int sid;
6 | private String kname;
7 | private String fenshu;
8 | private String teacher;
9 | public Chengji() {
10 | super();
11 | // TODO Auto-generated constructor stub
12 | }
13 | public Chengji(int id, int sid, String kname, String fenshu, String teacher) {
14 | super();
15 | this.id = id;
16 | this.sid = sid;
17 | this.kname = kname;
18 | this.fenshu = fenshu;
19 | this.teacher = teacher;
20 | }
21 | @Override
22 | public String toString() {
23 | return "Chengji [id=" + id + ", sid=" + sid + ", kname=" + kname + ", fenshu=" + fenshu + ", teacher=" + teacher
24 | + "]";
25 | }
26 | public int getId() {
27 | return id;
28 | }
29 | public void setId(int id) {
30 | this.id = id;
31 | }
32 | public int getSid() {
33 | return sid;
34 | }
35 | public void setSid(int sid) {
36 | this.sid = sid;
37 | }
38 | public String getKname() {
39 | return kname;
40 | }
41 | public void setKname(String kname) {
42 | this.kname = kname;
43 | }
44 | public String getFenshu() {
45 | return fenshu;
46 | }
47 | public void setFenshu(String fenshu) {
48 | this.fenshu = fenshu;
49 | }
50 | public String getTeacher() {
51 | return teacher;
52 | }
53 | public void setTeacher(String teacher) {
54 | this.teacher = teacher;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/src/com/yzk/student/model/Classs.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.model;
2 |
3 | public class Classs {
4 | private int id;
5 | private String name;
6 |
7 | public Classs(int id, String name) {
8 | super();
9 | this.id = id;
10 | this.name = name;
11 | }
12 |
13 | public Classs() {
14 | super();
15 | // TODO Auto-generated constructor stub
16 | }
17 |
18 | @Override
19 | public String toString() {
20 | return "Classs [id=" + id + ", name=" + name + "]";
21 | }
22 |
23 | public int getId() {
24 | return id;
25 | }
26 |
27 | public void setId(int id) {
28 | this.id = id;
29 | }
30 |
31 | public String getName() {
32 | return name;
33 | }
34 |
35 | public void setName(String name) {
36 | this.name = name;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/com/yzk/student/model/Kecheng.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.model;
2 |
3 | public class Kecheng {
4 | private int id;
5 | private String name;
6 | public Kecheng(int id, String name) {
7 | super();
8 | this.id = id;
9 | this.name = name;
10 | }
11 | public Kecheng() {
12 | super();
13 | // TODO Auto-generated constructor stub
14 | }
15 | @Override
16 | public String toString() {
17 | return "Kecheng [id=" + id + ", name=" + name + "]";
18 | }
19 | public int getId() {
20 | return id;
21 | }
22 | public void setId(int id) {
23 | this.id = id;
24 | }
25 | public String getName() {
26 | return name;
27 | }
28 | public void setName(String name) {
29 | this.name = name;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/com/yzk/student/model/Student.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.model;
2 |
3 | public class Student {
4 | private int id;
5 | private String name;
6 | private String gender;
7 | private int age;
8 | private String classs;
9 | private String major;
10 |
11 | public Student() {
12 | super();
13 | // TODO Auto-generated constructor stub
14 | }
15 |
16 | public Student(int id, String name, String gender, int age, String classs, String major) {
17 | super();
18 | this.id = id;
19 | this.name = name;
20 | this.gender = gender;
21 | this.age = age;
22 | this.classs = classs;
23 | this.major = major;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | return "Student [id=" + id + ", name=" + name + ", gender=" + gender + ", age=" + age + ", classs=" + classs
29 | + ", major=" + major + "]";
30 | }
31 |
32 | public int getId() {
33 | return id;
34 | }
35 |
36 | public void setId(int id) {
37 | this.id = id;
38 | }
39 |
40 | public String getName() {
41 | return name;
42 | }
43 |
44 | public void setName(String name) {
45 | this.name = name;
46 | }
47 |
48 | public String getGender() {
49 | return gender;
50 | }
51 |
52 | public void setGender(String gender) {
53 | this.gender = gender;
54 | }
55 |
56 | public int getAge() {
57 | return age;
58 | }
59 |
60 | public void setAge(int age) {
61 | this.age = age;
62 | }
63 |
64 | public String getClasss() {
65 | return classs;
66 | }
67 |
68 | public void setClasss(String classs) {
69 | this.classs = classs;
70 | }
71 |
72 | public String getMajor() {
73 | return major;
74 | }
75 |
76 | public void setMajor(String major) {
77 | this.major = major;
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/src/com/yzk/student/model/Teacher.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.model;
2 |
3 | public class Teacher {
4 | private int id;
5 | private String name;
6 | private String gender;
7 | private int age;
8 | private String kname;
9 | public Teacher(int id, String name, String gender, int age, String kname) {
10 | super();
11 | this.id = id;
12 | this.name = name;
13 | this.gender = gender;
14 | this.age = age;
15 | this.kname = kname;
16 | }
17 | public Teacher() {
18 | super();
19 | // TODO Auto-generated constructor stub
20 | }
21 | public int getId() {
22 | return id;
23 | }
24 | public void setId(int id) {
25 | this.id = id;
26 | }
27 | public String getName() {
28 | return name;
29 | }
30 | public void setName(String name) {
31 | this.name = name;
32 | }
33 | public String getGender() {
34 | return gender;
35 | }
36 | public void setGender(String gender) {
37 | this.gender = gender;
38 | }
39 | public int getAge() {
40 | return age;
41 | }
42 | public void setAge(int age) {
43 | this.age = age;
44 | }
45 | public String getKname() {
46 | return kname;
47 | }
48 | public void setKname(String kname) {
49 | this.kname = kname;
50 | }
51 |
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/AddChengji.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.yzk.student.daoimp.ChengjiDaoImp;
13 | import com.yzk.student.daoimp.KechengDaoImp;
14 | import com.yzk.student.daoimp.TeacherDaoImo;
15 | import com.yzk.student.model.Chengji;
16 | import com.yzk.student.model.Kecheng;
17 | import com.yzk.student.model.Teacher;
18 |
19 | @WebServlet("/AddChengji")
20 | public class AddChengji extends HttpServlet {
21 | private static final long serialVersionUID = 1L;
22 |
23 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
24 | throws ServletException, IOException {
25 | response.getWriter().append("Served at: ").append(request.getContextPath());
26 | }
27 |
28 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
29 | throws ServletException, IOException {
30 | request.setCharacterEncoding("UTF-8");
31 | response.setCharacterEncoding("UTF-8");
32 | TeacherDaoImo teacherDaoImo = new TeacherDaoImo();
33 | ChengjiDaoImp daoImo = new ChengjiDaoImp();
34 | int sid = Integer.parseInt((String) request.getSession().getAttribute("sid"));
35 | Chengji chengji2 = new Chengji(0, sid, request.getParameter("kname"), request.getParameter("fenshu"), null);
36 | for (Teacher temp : teacherDaoImo.selectAllTeacher()) {
37 | if (temp.getKname().equals(request.getParameter("kname"))) {
38 | chengji2.setTeacher(temp.getName());
39 | }
40 | }
41 | System.out.println(chengji2);
42 | daoImo.insert(chengji2);
43 | ChengjiDaoImp chengjiDaoImp = new ChengjiDaoImp();
44 | ArrayList chengjis = new ArrayList<>();
45 | for (Chengji chengji : chengjiDaoImp.selectAll()) {
46 | if (chengji.getSid() == sid) {
47 | chengjis.add(chengji);
48 | }
49 | }
50 | request.setAttribute("list", chengjis);
51 | request.getRequestDispatcher("/studentChengjiList.jsp").forward(request, response);
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/AddClasss.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.annotation.WebServlet;
7 | import javax.servlet.http.HttpServlet;
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 |
11 | import com.yzk.student.daoimp.ClasssDaoImp;
12 | import com.yzk.student.model.Classs;
13 |
14 | @WebServlet("/AddClasss")
15 | public class AddClasss extends HttpServlet {
16 | private static final long serialVersionUID = 1L;
17 |
18 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
19 | throws ServletException, IOException {
20 | response.getWriter().append("Served at: ").append(request.getContextPath());
21 | }
22 |
23 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
24 | throws ServletException, IOException {
25 | request.setCharacterEncoding("UTF-8");
26 | response.setCharacterEncoding("UTF-8");
27 | ClasssDaoImp daoImo = new ClasssDaoImp();
28 | Classs classs = new Classs(0, request.getParameter("name"));
29 | daoImo.insert(classs);
30 | request.setAttribute("list", daoImo.selectAll());
31 | request.getRequestDispatcher("/classslist.jsp").forward(request, response);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/AddKecheng.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.annotation.WebServlet;
7 | import javax.servlet.http.HttpServlet;
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 |
11 | import com.yzk.student.daoimp.KechengDaoImp;
12 | import com.yzk.student.model.Kecheng;
13 |
14 | @WebServlet("/AddKecheng")
15 | public class AddKecheng extends HttpServlet {
16 | private static final long serialVersionUID = 1L;
17 |
18 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
19 | throws ServletException, IOException {
20 | response.getWriter().append("Served at: ").append(request.getContextPath());
21 | }
22 |
23 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
24 | throws ServletException, IOException {
25 | request.setCharacterEncoding("UTF-8");
26 | response.setCharacterEncoding("UTF-8");
27 | KechengDaoImp daoImo = new KechengDaoImp();
28 | Kecheng classs = new Kecheng(0, request.getParameter("name"));
29 | daoImo.insert(classs);
30 | request.setAttribute("list", daoImo.selectAll());
31 | request.getRequestDispatcher("/kechenglist.jsp").forward(request, response);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/AddStudentServlet.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.annotation.WebServlet;
7 | import javax.servlet.http.HttpServlet;
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 |
11 | import com.yzk.student.daoimp.StudentDaoImo;
12 | import com.yzk.student.model.Student;
13 |
14 | @WebServlet("/AddStudent")
15 | public class AddStudentServlet extends HttpServlet {
16 | private static final long serialVersionUID = 1L;
17 |
18 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
19 | throws ServletException, IOException {
20 | response.getWriter().append("Served at: ").append(request.getContextPath());
21 | }
22 |
23 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
24 | throws ServletException, IOException {
25 | request.setCharacterEncoding("UTF-8");
26 | response.setCharacterEncoding("UTF-8");
27 | StudentDaoImo daoImo = new StudentDaoImo();
28 | Student student = new Student(0, request.getParameter("name"), request.getParameter("gender"),
29 | Integer.parseInt(request.getParameter("age")), request.getParameter("classs"),
30 | request.getParameter("major"));
31 | // String sql = " INSERT INTO Student (name, gender, age,classs,major)" + "VALUES('" + student.getName() + "','"
32 | // + student.getGender() + "'," + student.getAge() + ",'" + student.getClasss() + "','"
33 | // + student.getMajor() + "');";
34 | daoImo.insertStudent(student);
35 | request.setAttribute("list", daoImo.selectAllStudent());
36 | request.getRequestDispatcher("/studentlist.jsp").forward(request, response);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/AddTeacherServlet.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.annotation.WebServlet;
7 | import javax.servlet.http.HttpServlet;
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 |
11 | import com.yzk.student.daoimp.StudentDaoImo;
12 | import com.yzk.student.daoimp.TeacherDaoImo;
13 | import com.yzk.student.model.Student;
14 | import com.yzk.student.model.Teacher;
15 |
16 | @WebServlet("/AddTeacher")
17 | public class AddTeacherServlet extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
21 | throws ServletException, IOException {
22 | response.getWriter().append("Served at: ").append(request.getContextPath());
23 | }
24 |
25 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
26 | throws ServletException, IOException {
27 | request.setCharacterEncoding("UTF-8");
28 | response.setCharacterEncoding("UTF-8");
29 | TeacherDaoImo daoImo = new TeacherDaoImo();
30 | Teacher teacher = new Teacher(0, request.getParameter("name"), request.getParameter("gender"),
31 | Integer.parseInt(request.getParameter("age")), request.getParameter("kname"));
32 | daoImo.insertTeacher(teacher);
33 | request.setAttribute("list", daoImo.selectAllTeacher());
34 | request.getRequestDispatcher("/teacherlist.jsp").forward(request, response);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/ClasssList.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 |
12 | /**
13 | * Servlet implementation class StudentList
14 | */
15 | @WebServlet("/ClasssList")
16 | public class ClasssList extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public ClasssList() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | // TODO Auto-generated method stub
34 | doPost(request, response);
35 | response.getWriter().append("Served at: ").append(request.getContextPath());
36 | }
37 |
38 | /**
39 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
40 | * response)
41 | */
42 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
43 | throws ServletException, IOException {
44 | request.setCharacterEncoding("UTF-8");
45 | response.setCharacterEncoding("UTF-8");
46 | ClasssDaoImp daoImo = new ClasssDaoImp();
47 | request.setAttribute("list", daoImo.selectAll());
48 | request.getRequestDispatcher("/classslist.jsp").forward(request, response);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/DelChengji.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.yzk.student.daoimp.ChengjiDaoImp;
13 | import com.yzk.student.model.Chengji;
14 |
15 | @WebServlet("/DelChengji")
16 | public class DelChengji extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public DelChengji() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | doPost(request, response);
34 | response.getWriter().append("Served at: ").append(request.getContextPath());
35 | }
36 |
37 | /**
38 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
39 | * response)
40 | */
41 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
42 | throws ServletException, IOException {
43 | ChengjiDaoImp daoImo = new ChengjiDaoImp();
44 | daoImo.delete(Integer.parseInt(request.getParameter("id")));
45 | ChengjiDaoImp chengjiDaoImp = new ChengjiDaoImp();
46 | ArrayList chengjis = new ArrayList<>();
47 | int sid =Integer.parseInt((String) request.getSession().getAttribute("sid"));
48 | for (Chengji chengji : chengjiDaoImp.selectAll()) {
49 | if (chengji.getSid() == sid) {
50 | chengjis.add(chengji);
51 | }
52 | }
53 | request.setAttribute("list", chengjis);
54 | request.getRequestDispatcher("/studentChengjiList.jsp").forward(request, response);
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/DelClasss.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.yzk.student.daoimp.ClasssDaoImp;
13 | import com.yzk.student.daoimp.StudentDaoImo;
14 | import com.yzk.student.daoimp.TeacherDaoImo;
15 | import com.yzk.student.model.Classs;
16 | import com.yzk.student.model.Student;
17 |
18 | @WebServlet("/DelClasss")
19 | public class DelClasss extends HttpServlet {
20 | private static final long serialVersionUID = 1L;
21 |
22 | /**
23 | * @see HttpServlet#HttpServlet()
24 | */
25 | public DelClasss() {
26 | super();
27 | // TODO Auto-generated constructor stub
28 | }
29 |
30 | /**
31 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
32 | * response)
33 | */
34 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
35 | throws ServletException, IOException {
36 | doPost(request, response);
37 | response.getWriter().append("Served at: ").append(request.getContextPath());
38 | }
39 |
40 | /**
41 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
42 | * response)
43 | */
44 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
45 | throws ServletException, IOException {
46 | ClasssDaoImp daoImo = new ClasssDaoImp();
47 | StudentDaoImo studentDaoImo = new StudentDaoImo();
48 | ArrayList arrayList = new ArrayList();
49 | int id =Integer.parseInt(request.getParameter("id"));
50 | Classs classsname = daoImo.selectById(id);
51 | daoImo.delete(Integer.parseInt(request.getParameter("id")));
52 | request.setAttribute("list", daoImo.selectAll());
53 |
54 | for(Student student : studentDaoImo.selectAllStudent())
55 | {
56 | if(student.getClasss().equals(classsname.getName()))
57 | {
58 | studentDaoImo.delclass(student.getId());
59 | }
60 | }
61 |
62 | request.getRequestDispatcher("/classslist.jsp").forward(request, response);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/DelKecheng.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.KechengDaoImp;
11 | import com.yzk.student.daoimp.TeacherDaoImo;
12 | import com.yzk.student.model.Kecheng;
13 | import com.yzk.student.model.Teacher;
14 |
15 | @WebServlet("/DelKecheng")
16 | public class DelKecheng extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public DelKecheng() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | doPost(request, response);
34 | response.getWriter().append("Served at: ").append(request.getContextPath());
35 | }
36 |
37 | /**
38 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
39 | * response)
40 | */
41 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
42 | throws ServletException, IOException {
43 | KechengDaoImp daoImo = new KechengDaoImp();
44 | Kecheng kecheng = daoImo.selectById(Integer.parseInt(request.getParameter("id")));
45 | TeacherDaoImo teacherDaoImo = new TeacherDaoImo();
46 | for (Teacher teacher : teacherDaoImo.selectAllTeacher()) {
47 | if (teacher.getKname().equals(kecheng.getName())) {
48 | teacherDaoImo.delkecheng(teacher.getId());
49 | }
50 | }
51 | daoImo.delete(Integer.parseInt(request.getParameter("id")));
52 | request.setAttribute("list", daoImo.selectAll());
53 | request.getRequestDispatcher("/kechenglist.jsp").forward(request, response);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/DelStudent.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 |
12 | /**
13 | * Servlet implementation class DelStudent
14 | */
15 | @WebServlet("/DelStudent")
16 | public class DelStudent extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public DelStudent() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | doPost(request, response);
34 | response.getWriter().append("Served at: ").append(request.getContextPath());
35 | }
36 |
37 | /**
38 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
39 | * response)
40 | */
41 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
42 | throws ServletException, IOException {
43 | System.out.println();
44 | StudentDaoImo daoImo = new StudentDaoImo();
45 | daoImo.deleteStudent(Integer.parseInt(request.getParameter("id")));
46 | request.setAttribute("list", daoImo.selectAllStudent());
47 | request.getRequestDispatcher("/studentlist.jsp").forward(request, response);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/DelTeacher.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 | import com.yzk.student.daoimp.TeacherDaoImo;
12 |
13 | @WebServlet("/DelTeacher")
14 | public class DelTeacher extends HttpServlet {
15 | private static final long serialVersionUID = 1L;
16 |
17 | /**
18 | * @see HttpServlet#HttpServlet()
19 | */
20 | public DelTeacher() {
21 | super();
22 | // TODO Auto-generated constructor stub
23 | }
24 |
25 | /**
26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
27 | * response)
28 | */
29 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
30 | throws ServletException, IOException {
31 | doPost(request, response);
32 | response.getWriter().append("Served at: ").append(request.getContextPath());
33 | }
34 |
35 | /**
36 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
37 | * response)
38 | */
39 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
40 | throws ServletException, IOException {
41 | TeacherDaoImo daoImo = new TeacherDaoImo();
42 | daoImo.deleteTeacher(Integer.parseInt(request.getParameter("id")));
43 | request.setAttribute("list", daoImo.selectAllTeacher());
44 | request.getRequestDispatcher("/teacherlist.jsp").forward(request, response);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/Errorer.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/src/com/yzk/student/servlet/Errorer.java
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/ExitLogin.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | /**
11 | * Servlet implementation class LoginServlet
12 | */
13 | @WebServlet("/ExitLogin")
14 | public class ExitLogin extends HttpServlet {
15 | private static final long serialVersionUID = 1L;
16 |
17 | /**
18 | * @see HttpServlet#HttpServlet()
19 | */
20 | public ExitLogin() {
21 | super();
22 | // TODO Auto-generated constructor stub
23 | }
24 |
25 | /**
26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
27 | * response)
28 | */
29 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
30 | throws ServletException, IOException {
31 | doPost(request, response);
32 | }
33 |
34 | /**
35 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
36 | * response)
37 | */
38 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
39 | throws ServletException, IOException {
40 | request.getSession().removeAttribute("uname");
41 | request.getRequestDispatcher("/login.jsp").forward(request, response);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindAllClasssName.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 |
12 | /**
13 | * Servlet implementation class StudentList
14 | */
15 | @WebServlet("/FindAllClasssName")
16 | public class FindAllClasssName extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public FindAllClasssName() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | // TODO Auto-generated method stub
34 | doPost(request, response);
35 | response.getWriter().append("Served at: ").append(request.getContextPath());
36 | }
37 |
38 | /**
39 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
40 | * response)
41 | */
42 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
43 | throws ServletException, IOException {
44 | request.setCharacterEncoding("UTF-8");
45 | response.setCharacterEncoding("UTF-8");
46 | ClasssDaoImp daoImo = new ClasssDaoImp();
47 | request.setAttribute("list", daoImo.selectAll());
48 | request.getRequestDispatcher("/addStudent.jsp").forward(request, response);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindAllClasssNameByUp.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 |
12 | /**
13 | * Servlet implementation class StudentList
14 | */
15 | @WebServlet("/FindAllClasssNameByUp")
16 | public class FindAllClasssNameByUp extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public FindAllClasssNameByUp() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | // TODO Auto-generated method stub
34 | doPost(request, response);
35 | response.getWriter().append("Served at: ").append(request.getContextPath());
36 | }
37 |
38 | /**
39 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
40 | * response)
41 | */
42 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
43 | throws ServletException, IOException {
44 | request.setCharacterEncoding("UTF-8");
45 | response.setCharacterEncoding("UTF-8");
46 | ClasssDaoImp daoImo = new ClasssDaoImp();
47 | request.setAttribute("list", daoImo.selectAll());
48 | request.getRequestDispatcher("/addStudent.jsp").forward(request, response);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindAllKechnegName.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.KechengDaoImp;
12 |
13 | /**
14 | * Servlet implementation class StudentList
15 | */
16 | @WebServlet("/FindAllKechnegName")
17 | public class FindAllKechnegName extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | /**
21 | * @see HttpServlet#HttpServlet()
22 | */
23 | public FindAllKechnegName() {
24 | super();
25 | // TODO Auto-generated constructor stub
26 | }
27 |
28 | /**
29 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
30 | * response)
31 | */
32 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 | // TODO Auto-generated method stub
35 | doPost(request, response);
36 | response.getWriter().append("Served at: ").append(request.getContextPath());
37 | }
38 |
39 | /**
40 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
41 | * response)
42 | */
43 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
44 | throws ServletException, IOException {
45 | request.setCharacterEncoding("UTF-8");
46 | response.setCharacterEncoding("UTF-8");
47 | KechengDaoImp daoImo = new KechengDaoImp();
48 | request.setAttribute("list", daoImo.selectAll());
49 | request.getRequestDispatcher("/addchengji.jsp").forward(request, response);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindAllKechnegNameByTeacher.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.KechengDaoImp;
12 |
13 | /**
14 | * Servlet implementation class StudentList
15 | */
16 | @WebServlet("/FindAllKechnegNameByTeacher")
17 | public class FindAllKechnegNameByTeacher extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 |
21 | /**
22 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
23 | * response)
24 | */
25 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
26 | throws ServletException, IOException {
27 | // TODO Auto-generated method stub
28 | doPost(request, response);
29 | response.getWriter().append("Served at: ").append(request.getContextPath());
30 | }
31 |
32 | /**
33 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
34 | * response)
35 | */
36 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
37 | throws ServletException, IOException {
38 | request.setCharacterEncoding("UTF-8");
39 | response.setCharacterEncoding("UTF-8");
40 | KechengDaoImp daoImo = new KechengDaoImp();
41 | request.setAttribute("list", daoImo.selectAll());
42 | request.getRequestDispatcher("/addTeacher.jsp").forward(request, response);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindAllKechnegNameByUpTeacher.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.KechengDaoImp;
12 |
13 | /**
14 | * Servlet implementation class StudentList
15 | */
16 | @WebServlet("/FindAllKechnegNameByUpTeacher")
17 | public class FindAllKechnegNameByUpTeacher extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 |
21 | /**
22 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
23 | * response)
24 | */
25 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
26 | throws ServletException, IOException {
27 | // TODO Auto-generated method stub
28 | doPost(request, response);
29 | response.getWriter().append("Served at: ").append(request.getContextPath());
30 | }
31 |
32 | /**
33 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
34 | * response)
35 | */
36 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
37 | throws ServletException, IOException {
38 | request.setCharacterEncoding("UTF-8");
39 | response.setCharacterEncoding("UTF-8");
40 | KechengDaoImp daoImo = new KechengDaoImp();
41 | request.setAttribute("list", daoImo.selectAll());
42 | request.getRequestDispatcher("/upTeacher.jsp").forward(request, response);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindChengjiById.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ChengjiDaoImp;
11 |
12 | @WebServlet("/FindChengjiById")
13 | public class FindChengjiById extends HttpServlet {
14 | private static final long serialVersionUID = 1L;
15 |
16 | public FindChengjiById() {
17 | super();
18 | }
19 |
20 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
21 | throws ServletException, IOException {
22 | doPost(request, response);
23 | response.getWriter().append("Served at: ").append(request.getContextPath());
24 | }
25 |
26 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
27 | throws ServletException, IOException {
28 | request.setCharacterEncoding("UTF-8");
29 | response.setCharacterEncoding("UTF-8");
30 | ChengjiDaoImp daoImo = new ChengjiDaoImp();
31 | request.setAttribute("chengji", daoImo.selectById(Integer.parseInt(request.getParameter("id"))));
32 | request.getRequestDispatcher("/upchengji.jsp").forward(request, response);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindClasssById.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.StudentDaoImo;
12 |
13 | /**
14 | * Servlet implementation class FindStudentByname
15 | */
16 | @WebServlet("/FindClasssById")
17 | public class FindClasssById extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | public FindClasssById() {
21 | super();
22 | }
23 |
24 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
25 | throws ServletException, IOException {
26 | doPost(request, response);
27 | response.getWriter().append("Served at: ").append(request.getContextPath());
28 | }
29 |
30 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
31 | throws ServletException, IOException {
32 | request.setCharacterEncoding("UTF-8");
33 | response.setCharacterEncoding("UTF-8");
34 | ClasssDaoImp daoImo = new ClasssDaoImp();
35 | request.setAttribute("classs", daoImo.selectById(Integer.parseInt(request.getParameter("id"))));
36 | request.getRequestDispatcher("/upclasss.jsp").forward(request, response);
37 |
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindKechengById.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.KechengDaoImp;
12 | import com.yzk.student.daoimp.StudentDaoImo;
13 |
14 | /**
15 | * Servlet implementation class FindStudentByname
16 | */
17 | @WebServlet("/FindKechengById")
18 | public class FindKechengById extends HttpServlet {
19 | private static final long serialVersionUID = 1L;
20 |
21 | public FindKechengById() {
22 | super();
23 | }
24 |
25 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
26 | throws ServletException, IOException {
27 | doPost(request, response);
28 | response.getWriter().append("Served at: ").append(request.getContextPath());
29 | }
30 |
31 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | request.setCharacterEncoding("UTF-8");
34 | response.setCharacterEncoding("UTF-8");
35 | KechengDaoImp daoImo = new KechengDaoImp();
36 | request.setAttribute("kecheng", daoImo.selectById(Integer.parseInt(request.getParameter("id"))));
37 | request.getRequestDispatcher("/upkecheng.jsp").forward(request, response);
38 |
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindStudentByID.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.StudentDaoImo;
12 |
13 | /**
14 | * Servlet implementation class FindStudentByname
15 | */
16 | @WebServlet("/FindStudentById")
17 | public class FindStudentByID extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | public FindStudentByID() {
21 | super();
22 | }
23 |
24 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
25 | throws ServletException, IOException {
26 | doPost(request, response);
27 | response.getWriter().append("Served at: ").append(request.getContextPath());
28 | }
29 |
30 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
31 | throws ServletException, IOException {
32 | request.setCharacterEncoding("UTF-8");
33 | response.setCharacterEncoding("UTF-8");
34 | StudentDaoImo daoImo = new StudentDaoImo();
35 | request.setAttribute("student", daoImo.selectStudentById(Integer.parseInt(request.getParameter("id"))));
36 | ClasssDaoImp classsDaoImp = new ClasssDaoImp();
37 | request.setAttribute("list", classsDaoImp.selectAll());
38 | request.getRequestDispatcher("/upStudent.jsp").forward(request, response);
39 |
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindStudentByname.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 |
12 | /**
13 | * Servlet implementation class FindStudentByname
14 | */
15 | @WebServlet("/FindStudentByname")
16 | public class FindStudentByname extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public FindStudentByname() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | // TODO Auto-generated method stub
34 | response.getWriter().append("Served at: ").append(request.getContextPath());
35 | }
36 |
37 | /**
38 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
39 | * response)
40 | */
41 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
42 | throws ServletException, IOException {
43 | request.setCharacterEncoding("UTF-8");
44 | response.setCharacterEncoding("UTF-8");
45 | StudentDaoImo daoImo = new StudentDaoImo();
46 | request.setAttribute("list", daoImo.selectStudentByName(request.getParameter("name")));
47 | request.getRequestDispatcher("/studentlist.jsp").forward(request, response);
48 | doGet(request, response);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindStudentChengji.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.yzk.student.daoimp.ChengjiDaoImp;
13 | import com.yzk.student.model.Chengji;
14 |
15 | /**
16 | * Servlet implementation class FindStudentByname
17 | */
18 | @WebServlet("/FindStudentChengji")
19 | public class FindStudentChengji extends HttpServlet {
20 | private static final long serialVersionUID = 1L;
21 |
22 | public FindStudentChengji() {
23 | super();
24 | }
25 |
26 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
27 | throws ServletException, IOException {
28 | doPost(request, response);
29 | response.getWriter().append("Served at: ").append(request.getContextPath());
30 | }
31 |
32 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 | request.setCharacterEncoding("UTF-8");
35 | response.setCharacterEncoding("UTF-8");
36 | ChengjiDaoImp chengjiDaoImp = new ChengjiDaoImp();
37 | ArrayList chengjis = new ArrayList<>();
38 | request.getSession().setAttribute("sid",request.getParameter("id"));
39 | int sid =Integer.parseInt((String) request.getSession().getAttribute("sid"));
40 | System.out.println(sid);
41 | for (Chengji chengji : chengjiDaoImp.selectAll()) {
42 | if (chengji.getSid() == sid) {
43 | chengjis.add(chengji);
44 | }
45 | }
46 | request.setAttribute("list", chengjis);
47 | request.getRequestDispatcher("/studentChengjiList.jsp").forward(request, response);
48 |
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindTeacherByID.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.TeacherDaoImo;
11 |
12 | /**
13 | * Servlet implementation class FindStudentByname
14 | */
15 | @WebServlet("/FindTeacherByID")
16 | public class FindTeacherByID extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | public FindTeacherByID() {
20 | super();
21 | }
22 |
23 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
24 | throws ServletException, IOException {
25 | doPost(request, response);
26 | response.getWriter().append("Served at: ").append(request.getContextPath());
27 | }
28 |
29 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
30 | throws ServletException, IOException {
31 | request.setCharacterEncoding("UTF-8");
32 | response.setCharacterEncoding("UTF-8");
33 | TeacherDaoImo daoImo = new TeacherDaoImo();
34 | request.setAttribute("teacher", daoImo.selectTeacherById(Integer.parseInt(request.getParameter("id"))));
35 | request.getRequestDispatcher("/upTeacher.jsp").forward(request, response);
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/FindTeacherByname.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 | import com.yzk.student.daoimp.TeacherDaoImo;
12 |
13 | /**
14 | * Servlet implementation class FindStudentByname
15 | */
16 | @WebServlet("/FindTeacherByname")
17 | public class FindTeacherByname extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | /**
21 | * @see HttpServlet#HttpServlet()
22 | */
23 | public FindTeacherByname() {
24 | super();
25 | // TODO Auto-generated constructor stub
26 | }
27 |
28 | /**
29 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
30 | * response)
31 | */
32 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 | // TODO Auto-generated method stub
35 | response.getWriter().append("Served at: ").append(request.getContextPath());
36 | }
37 |
38 | /**
39 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
40 | * response)
41 | */
42 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
43 | throws ServletException, IOException {
44 | request.setCharacterEncoding("UTF-8");
45 | response.setCharacterEncoding("UTF-8");
46 | TeacherDaoImo daoImo = new TeacherDaoImo();
47 | request.setAttribute("list", daoImo.selectTeacherByName(request.getParameter("name")));
48 | request.getRequestDispatcher("/teacherlist.jsp").forward(request, response);
49 | doGet(request, response);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/KechengList.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.KechengDaoImp;
12 |
13 | /**
14 | * Servlet implementation class StudentList
15 | */
16 | @WebServlet("/KechengList")
17 | public class KechengList extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | /**
21 | * @see HttpServlet#HttpServlet()
22 | */
23 | public KechengList() {
24 | super();
25 | // TODO Auto-generated constructor stub
26 | }
27 |
28 | /**
29 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
30 | * response)
31 | */
32 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 | // TODO Auto-generated method stub
35 | doPost(request, response);
36 | response.getWriter().append("Served at: ").append(request.getContextPath());
37 | }
38 |
39 | /**
40 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
41 | * response)
42 | */
43 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
44 | throws ServletException, IOException {
45 | request.setCharacterEncoding("UTF-8");
46 | response.setCharacterEncoding("UTF-8");
47 | KechengDaoImp daoImo = new KechengDaoImp();
48 | request.setAttribute("list", daoImo.selectAll());
49 | request.getRequestDispatcher("/kechenglist.jsp").forward(request, response);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/LoginServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/src/com/yzk/student/servlet/LoginServlet.java
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/StudentList.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 |
12 | /**
13 | * Servlet implementation class StudentList
14 | */
15 | @WebServlet("/StudentList")
16 | public class StudentList extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * @see HttpServlet#HttpServlet()
21 | */
22 | public StudentList() {
23 | super();
24 | // TODO Auto-generated constructor stub
25 | }
26 |
27 | /**
28 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
29 | * response)
30 | */
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
32 | throws ServletException, IOException {
33 | // TODO Auto-generated method stub
34 | doPost(request, response);
35 | response.getWriter().append("Served at: ").append(request.getContextPath());
36 | }
37 |
38 | /**
39 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
40 | * response)
41 | */
42 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
43 | throws ServletException, IOException {
44 | request.setCharacterEncoding("UTF-8");
45 | response.setCharacterEncoding("UTF-8");
46 | StudentDaoImo daoImo = new StudentDaoImo();
47 | request.setAttribute("list", daoImo.selectAllStudent());
48 | request.getRequestDispatcher("/studentlist.jsp").forward(request, response);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/TeacherList.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 | import com.yzk.student.daoimp.TeacherDaoImo;
12 |
13 | /**
14 | * Servlet implementation class StudentList
15 | */
16 | @WebServlet("/TeacherList")
17 | public class TeacherList extends HttpServlet {
18 | private static final long serialVersionUID = 1L;
19 |
20 | /**
21 | * @see HttpServlet#HttpServlet()
22 | */
23 | public TeacherList() {
24 | super();
25 | // TODO Auto-generated constructor stub
26 | }
27 |
28 | /**
29 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
30 | * response)
31 | */
32 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 | // TODO Auto-generated method stub
35 | doPost(request, response);
36 | response.getWriter().append("Served at: ").append(request.getContextPath());
37 | }
38 |
39 | /**
40 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
41 | * response)
42 | */
43 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
44 | throws ServletException, IOException {
45 | request.setCharacterEncoding("UTF-8");
46 | response.setCharacterEncoding("UTF-8");
47 | TeacherDaoImo daoImo = new TeacherDaoImo();
48 | request.setAttribute("list", daoImo.selectAllTeacher());
49 | request.getRequestDispatcher("/teacherlist.jsp").forward(request, response);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/UpChengji.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 |
6 | import javax.servlet.ServletException;
7 | import javax.servlet.annotation.WebServlet;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 |
12 | import com.yzk.student.daoimp.ChengjiDaoImp;
13 | import com.yzk.student.model.Chengji;
14 |
15 | @WebServlet("/UpChengji")
16 | public class UpChengji extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
20 | throws ServletException, IOException {
21 | request.setCharacterEncoding("UTF-8");
22 | response.setCharacterEncoding("UTF-8");
23 | ChengjiDaoImp daoImo = new ChengjiDaoImp();
24 | Chengji chengji = new Chengji();
25 | chengji.setId(Integer.parseInt(request.getParameter("id")));
26 | chengji.setFenshu(request.getParameter("fenshu"));
27 | daoImo.update(chengji);
28 | int sid = Integer.parseInt((String) request.getSession().getAttribute("sid"));
29 | ArrayList chengjis = new ArrayList<>();
30 | for (Chengji temp : daoImo.selectAll()) {
31 | if (temp.getSid() == sid) {
32 | chengjis.add(temp);
33 | }
34 | }
35 | request.setAttribute("list", chengjis);
36 | request.getRequestDispatcher("/studentChengjiList.jsp").forward(request, response);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/UpClasss.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.ClasssDaoImp;
11 | import com.yzk.student.daoimp.StudentDaoImo;
12 | import com.yzk.student.model.Classs;
13 | import com.yzk.student.model.Student;
14 |
15 | @WebServlet("/UpClasss")
16 | public class UpClasss extends HttpServlet {
17 | private static final long serialVersionUID = 1L;
18 |
19 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
20 | throws ServletException, IOException {
21 | request.setCharacterEncoding("UTF-8");
22 | response.setCharacterEncoding("UTF-8");
23 | ClasssDaoImp daoImo = new ClasssDaoImp();
24 | Classs classs = new Classs(Integer.parseInt(request.getParameter("id")), request.getParameter("name"));
25 | daoImo.update(classs);
26 | request.setAttribute("list", daoImo.selectAll());
27 | request.getRequestDispatcher("/classslist.jsp").forward(request, response);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/UpKecheng.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.KechengDaoImp;
11 | import com.yzk.student.model.Kecheng;
12 |
13 | @WebServlet("/UpKecheng")
14 | public class UpKecheng extends HttpServlet {
15 | private static final long serialVersionUID = 1L;
16 |
17 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
18 | throws ServletException, IOException {
19 | request.setCharacterEncoding("UTF-8");
20 | response.setCharacterEncoding("UTF-8");
21 | KechengDaoImp daoImo = new KechengDaoImp();
22 | Kecheng kecheng = new Kecheng(Integer.parseInt(request.getParameter("id")), request.getParameter("name"));
23 | daoImo.update(kecheng);
24 | request.setAttribute("list", daoImo.selectAll());
25 | request.getRequestDispatcher("/kechenglist.jsp").forward(request, response);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/UpStudent.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.StudentDaoImo;
11 | import com.yzk.student.model.Student;
12 |
13 | @WebServlet("/UpStudent")
14 | public class UpStudent extends HttpServlet {
15 | private static final long serialVersionUID = 1L;
16 |
17 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
18 | throws ServletException, IOException {
19 | request.setCharacterEncoding("UTF-8");
20 | response.setCharacterEncoding("UTF-8");
21 | StudentDaoImo daoImo = new StudentDaoImo();
22 | Student student = new Student(Integer.parseInt(request.getParameter("number")), request.getParameter("name"),
23 | request.getParameter("gender"), Integer.parseInt(request.getParameter("age")),
24 | request.getParameter("classs"), request.getParameter("major"));
25 | daoImo.updateStudent(student);
26 | request.setAttribute("list", daoImo.selectAllStudent());
27 | request.getRequestDispatcher("/studentlist.jsp").forward(request, response);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/com/yzk/student/servlet/UpTeacher.java:
--------------------------------------------------------------------------------
1 | package com.yzk.student.servlet;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | import com.yzk.student.daoimp.TeacherDaoImo;
11 | import com.yzk.student.model.Teacher;
12 |
13 | @WebServlet("/UpTeacher")
14 | public class UpTeacher extends HttpServlet {
15 | private static final long serialVersionUID = 1L;
16 |
17 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
18 | throws ServletException, IOException {
19 | request.setCharacterEncoding("UTF-8");
20 | response.setCharacterEncoding("UTF-8");
21 | TeacherDaoImo daoImo = new TeacherDaoImo();
22 | Teacher teacher = new Teacher(Integer.parseInt(request.getParameter("number")), request.getParameter("name"),
23 | request.getParameter("gender"), Integer.parseInt(request.getParameter("age")),
24 | request.getParameter("classs"));
25 | daoImo.updateTeacher(teacher);
26 | request.setAttribute("list", daoImo.selectAllTeacher());
27 | request.getRequestDispatcher("/teacherlist.jsp").forward(request, response);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/com/yzk/student/util/JDBCUtil.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/src/com/yzk/student/util/JDBCUtil.java
--------------------------------------------------------------------------------
/src/com/yzk/student/util/JdbcMysql.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yzk2356911358/StudentServlet-JSP/d4d7a0643f1dae908a4831206f2714b21820f991/src/com/yzk/student/util/JdbcMysql.java
--------------------------------------------------------------------------------
/数据库文件/studentsystem-jsp-servlet.sql:
--------------------------------------------------------------------------------
1 |
2 | DROP TABLE IF EXISTS `chengji`;
3 | CREATE TABLE `chengji` (
4 | `id` int(0) NOT NULL AUTO_INCREMENT,
5 | `sid` int(0) NULL DEFAULT NULL,
6 | `kname` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
7 | `fenshu` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
8 | PRIMARY KEY (`id`) USING BTREE
9 | )ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
10 |
11 | -- ----------------------------
12 | -- Records of chengji
13 | -- ----------------------------
14 | INSERT INTO `chengji` VALUES (8, 19, 'Java', '30');
15 | INSERT INTO `chengji` VALUES (9, 20, 'Java', '30');
16 | INSERT INTO `chengji` VALUES (10, 19, '安卓', '100');
17 |
18 | -- ----------------------------
19 | -- Table structure for classs
20 | -- ----------------------------
21 | DROP TABLE IF EXISTS `classs`;
22 | CREATE TABLE `classs` (
23 | `id` int(0) NOT NULL AUTO_INCREMENT,
24 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
25 | PRIMARY KEY (`id`) USING BTREE
26 | ) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
27 |
28 | -- ----------------------------
29 | -- Records of classs
30 | -- ----------------------------
31 | INSERT INTO `classs` VALUES (4, 'Java一班');
32 |
33 | -- ----------------------------
34 | -- Table structure for kecheng
35 | -- ----------------------------
36 | DROP TABLE IF EXISTS `kecheng`;
37 | CREATE TABLE `kecheng` (
38 | `id` int(0) NOT NULL AUTO_INCREMENT,
39 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
40 | PRIMARY KEY (`id`) USING BTREE
41 | )ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
42 |
43 | -- ----------------------------
44 | -- Records of kecheng
45 | -- ----------------------------
46 | INSERT INTO `kecheng` VALUES (2, 'Java');
47 | INSERT INTO `kecheng` VALUES (3, '安卓');
48 |
49 | -- ----------------------------
50 | -- Table structure for student
51 | -- ----------------------------
52 | DROP TABLE IF EXISTS `student`;
53 | CREATE TABLE `student` (
54 | `id` int(0) NOT NULL AUTO_INCREMENT,
55 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
56 | `gender` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
57 | `age` int(0) NULL DEFAULT NULL,
58 | `classs` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
59 | `major` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
60 | PRIMARY KEY (`id`) USING BTREE
61 | ) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
62 |
63 | -- ----------------------------
64 | -- Records of student
65 | -- ----------------------------
66 | INSERT INTO `student` VALUES (19, '沈玉庆3', '男', 18, '安卓', 'Java');
67 | INSERT INTO `student` VALUES (20, '小明', '男', 12, 'Java一班', 'Java');
68 |
69 | -- ----------------------------
70 | -- Table structure for teacher
71 | -- ----------------------------
72 | DROP TABLE IF EXISTS `teacher`;
73 | CREATE TABLE `teacher` (
74 | `id` int(0) NOT NULL AUTO_INCREMENT,
75 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
76 | `gender` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
77 | `age` int(0) NULL DEFAULT NULL,
78 | `kname` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
79 | PRIMARY KEY (`id`) USING BTREE
80 | ) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
81 |
82 | -- ----------------------------
83 | -- Records of teacher
84 | -- ----------------------------
85 | INSERT INTO `teacher` VALUES (22, '沈玉庆3', '男', 3, 'Java');
86 | INSERT INTO `teacher` VALUES (23, '3', '男', 4, '安卓');
87 |
88 | SET FOREIGN_KEY_CHECKS = 1;
89 |
--------------------------------------------------------------------------------