Javaweb项目开发.docx
Javaweb项目开发课程名称:Javaweb项目开发学院:信息工程专业班级I计网2112学号:学生姓名:指导老师,1.编写程序通过JSP与后台serv1.et文件实现用户的登录功能必须具备用户名,密码变量。代码Jmportjavax.scrv1.ct.Scrv1.ctExccption;importjavax4»ervIet.annotation.WtbStimportjavaxerv1.et.hctp.HctpServ1.et;importjavaxcrv1.ct.http.HttpScrv1.ctRcqucst;im>ortjavaxerv1.et.http.HttpServ1.etResponse;importjava.1.o.1.OException;WebServ1.et(7JoginServ1.ef)pub1.icc1.assIoginServ1.etextendsHttpServ1.etprotectedvoiddoPost(HttpServ1.etRequestrequestHttpservIetResponseresponse)throwsServ1.etException,IOException获取施人的用户名和密码Stringusername=request.getParameter(*usemame,");Stringpassword=rcqucst.gctParamcter(',password,);迸行用户名和密科的H:较,并决定是否允泞用户齐录if(usename.equa1.s(*zk)&&password.equa1.sC*202103011566m)response.sendRedirect(*index.js);c1.scresponse.sendRedirect(',wekome.jsp,);)运行截图:1.编程实现通过JSP与JaVabean文件实现定义方法类,并且在JSP中调用完成设置5个数,在页面求最大值max和最小值min与按从大到小的顺序输出。代码:packagecom;pub1.icc1.assNumberBean(privateintnum1.;privateintnum2;privateintnum3;privateintnum4;privateintnum5;Puh1.icintgetNum1.Oreturnnum1.;pub1.icvoidsetNum1.(ntnum1)chi$.num1.=num1.;pub1.ictntgetNum2(returnnum2;)pub1.icvoidsetNum2(ntnum2)this.num2三num2;pub1.icintgctNum3Qreturnnum3;pub1.icvoidsctNum3(intnum3)this.num3三num3;)pub1.icintgctNum4Qreturnnum4;)pub1.icvoidsetNum4(intnum4)this.num4三num4;)pub1.icintgctNum50returnnum5;)pub1.icvoidsetNum5(intnum5)this.numS三num5;运行截图:最大(自:90最小值:10按从大到小的顺序输出5个数:9080302010编程实现蛋糕店主页和部分页面设计要求至少有5个功能可实现不同页面跳转。界面一:<!DOCTYPEhtm1.><!-savedfromur1.«(0041)fi1.e:/D:/java%2bepcake-twoabout.htm1.-><htm1.1.ang="en-Xheadxmetahttp-equiv=*Content-Type"contet=,te×thtm1.;CharSet=UTF-8”><metahttp-equiv,X-UA-Compatib1.e-content-MIE»edgeM><metaname=*viewport"content三-width=device-width,initia1.-sca1.e=1.0>tit1.e官网百页/tit1.e)<1.inkre1.-*,sty1.esheet,href".about-fi1.esimg.css,1.><sty1.e>.right-boxwidth:200px;height:250px;disp1.ay:f1.ex;f1.ex-direction:co1.umn;justify-content:space-around;).editwidth:5px;height:S0x;background-co1.or:orange;co1.or:white;disp1.ay:b1.ock;text-a1.ign:center;1.ine-height:50px;font-size:14p×<sty1.e><head><body><-大盒子开始><divid=,bo×,*>< 1.-头部1.ogo-><divid=',head,><imgsrc-M./about-fi1.es/u«2141250976,4215722085&fm-2S3&fmt-auto&app-138&f-JPEG*a1.t=>,><div>< !-头部1.og。-)< -超链接<divid=',chao,><u1.><1.i><ahref»"fi1.e:/D:/java%2wepcake-twoinde×.htm1.">首页<a><1.i><1.i><ahref=',fi1.e:/D:/java%20wepcake-twoabout.htm*>蛋糕房<a><U><1.i><ahref三"fi1.eD:/java%2wepcake-twoabout.htm1.,*>关于我们<ax1.i><1.i><ahref"fi1.ejava%2wep/CakjtWo/teaching.htm1.制作教学<ax1.i)<1.i><ahref-"fi1.e:/D:/java%2wepcake.two1.og1.n.htm1.,>注册登录<ax1.i><u1.><div><!-超链接)<-中间大盒子-一><divc1.ass='*bo×,*><divc1.ass-"ban"sty1.e三"margin:5p×autojwidth:12ep×j"><imgsrc=M./about-fi1.es/u=2680460166,2178262203&fm=253&fmt=auto&app=138&f=PNGwa1.t=t,sty1.e="width:1200p×height:30p×j,><div><divc1.ass,brank"sty1.e*"width:9S%margin:auto;height:3p×background-co1.or:Skyb1.uejdisp1.ay:f1.ex;justify-content:space-between>><divc1.ass»Mbrank_1.eft"sty1.e-"height:1.%;width:30%;,'><imgsc=m.about-fi1.essrc=httpsafe-img×-bw1.-2254651a-9318-4baf-8cab-fcc6afde8f6f-imageView2-2-w-1.8-format-jpgSrefer=httpsafe-img.×&app»20O2&size«f9999,10000&q«a80&n"0&g»0n&fmt»auto"a1.t=,sty1.e="width:1.%;height:100%;m><div><divc1.asst,brankright11sty1.e-"width:7%jheight:1.%;font-size:3p×jte×t-a1.ign:center;1.ine-height:30px;padding-top:8epx;”>婚礼蛋糕的由来婚礼/费,据传最早出现在古罗马时代。生样一词刖出自英语其原意是周酸的面包,同时也意味若“快乐幸福”之意,古代时富家子弟举办婚礼时.都要做一只转制的蛋糕,不仅在婚宴上新郎新娘一起吃,而且也请来贺喜的客人们吃蛋椎。客人们期望自己也能分享新婚夫妇的幸福。因此,那时蛋卷是放在新娘头上被切开的。<div><div><div><!-中间大盒子-><divid="food"><span>Copyright©2022-23CHAO1.IIUFUSHIcom,A1.1.rightreserved<br>2033-2080,版权所有XXXX豫ICP备eeeeee号<span><div><div><!-大盒子结束一><body><htm1.>运行截图1在第三道题的基础上实现蛋糕管理;完成蛋糕的添加、蛋糕信息的修改和删除等。<IDOCTYPEhtm1.><1.-savedfromur1.三(39)fi1.e:/Djava%20wepcaketwoimg.htm1.-><htm1.1.ang"en"><head><metahttp-equiv,Content-Type"content,te×thtm1.;charset=UTF-8-><metahttp-equiv-X-UA-Compatib1.e"content三*,IE三edge,><metaname",viewport-content-widthdevice-width,initia1.-sca1.e三1.,'><tit1.e>官网首页<tit1.e><1.inkre1.=H5ty1.esheet-href=".igfi1.esimg.css"><sty1.e>.right-boxwidth:2px;height:25px;disp1.ay:f1.ex;f1.ex-direction:co1.umn;justify-content:SPaCe-around;).editwidth:50px;height:50px;background-co1.or:orange;co1.or:white;disp1.ay:b1.ock;text-a1.ign:center;1.ine-height:5p×font-size:14px;)<sty1.e><head><body><!-大盒子开始><divid',box,>><dividhead"><imgsrc=".img-fi1.esu=2141250976,4215722085Sfm=253Sfmt=autoapp=138Sf=JPEGa1.t=",*><div><divid="chao*><u1.><1.i><ahref"fi1.e:/D:/j