Struts2开发案例

西北师范大学计算机科学与工程学院学生实验报告

学号:201371020107

2015年10月15日

计算机科2013软件班级 姓名 高凯 系别 计算机 专业 学与技术 课程名称 一班 专业必修 学时数 面向对象分析与设课程类型 计 实验名称 Struts2开发案例 实验目的和要求: 1. 熟悉和认识Struts2开发案例。 2. 对Struts2开发案例进行详细分析 实验内容: 1. MVC模式 MVC:Model-View-Controller 2.Structs2工作原理 2.1 Container调用控制器(Struts2.1以前FilterDispatcher,以后为StrutsPrepareAndExecuteFilter 2.2 Controller通过ActionMapper获得Action的信息 2.3 Controller调用ActionProxy 2.4 ActionProxy读取struts.xml文件获取action和interceptor stack的信息 2.5 ActionProxy把request请求传递给ActionInvocation 2.6 ActionInvocation依次调用action和interceptor 2.7 根据action的配置信息,产生result 2.8 Result信息返回给ActionInvocation 2.9 产生一个HttpServletResponse响应 2.10 产生的响应行为发送给客服端。 3.Structs2设计 登陆界面login.jsp <%@ page language=\ contentType=\ pageEncoding=\%> <%@taglib prefix=\ uri=\%> 登陆成功界面welcome.jsp <%@ page language=\ contentType=\ pageEncoding=\%> <%@taglib prefix=\ uri=\%> <s:text name=\title> <meta http-equiv=\ content=\ </head> <body> <s:text name=\ <s:param>${sessionScope.user}</s:param> </s:text><br/> </body> </html> 登陆失败界面error.jsp <%@ page language=\ contentType=\ pageEncoding=\%> <%@taglib prefix=\ uri=\%> <html> <head> <title><s:text name=\title> <meta http-equiv=\ content=\ </head> <body> <s:text name=\ </body> </html> 登录界面: 登陆成功 登陆失败 添加学生: <%@ page contentType=\%> <%@ taglib prefix=\ uri=\%> <html> </p><div class="page"><ul><li><a href=lhd_8h8ek8v9tf9gaib488ag_1.html class="hover" >1</a></li><li><a href=lhd_8h8ek8v9tf9gaib488ag_2.html>2</a></li><li><a href=lhd_8h8ek8v9tf9gaib488ag_3.html>3</a></li></ul></div></div> <div style="margin:0 auto;text-align:center;overflow:hidden"></div> <div class="hm-t-main"> <div class="hm-t-header"><h4><a rel="nofollow" target="_blank" href="/mlhdl_8h8ek8v9tf9gaib488ag.html">下载:Struts2开发案例.doc</a></h4></div> </div> <div class="nlt new"><div id="hm_t_19094"><div class="hm-t-container"><div class="hm-t-main"><div class="hm-t-header"><h4>最近浏览</h4></div> <ul class="hm-t-list hm-t-list-txt"> <li><a title="Struts2开发案例" href=mlhd_8h8ek8v9tf9gaib488ag_1.html>Struts2开发案例</a></li><li><a title="景观生态学论文word" href=mlhd_1qos27w3e05o77k3186e_1.html>景观生态学论文word</a></li><li><a title="环境监测选择题题目" href=mlhd_201sg966nh8uhsm07rsw_1.html>环境监测选择题题目</a></li><li><a title="国电电力财务管理制度汇编完整版" href=mlhd_0ivtu05ppi17c19373fh7l7tx29ybm00g5c_3.html>国电电力财务管理制度汇编完整版</a></li><li><a title="佛山市民营银行申请筹建投资战略分析报告" href=mlhd_70d7m7y5oq8wrp6237tz_4.html>佛山市民营银行申请筹建投资战略分析报告</a></li><li><a title="聚类分析模式识别" href=mlhd_3rw434tcru8qp201384q_1.html>聚类分析模式识别</a></li><li><a title="“十三五”规划重点-集中供热改造项目建议书(立项报告)" href=mlhd_6l9wg0rt427d82u9y9aw_1.html>“十三五”规划重点-集中供热改造项目建议书(立项报告)</a></li><li><a title="JCG-51.软件许可协议(三方)" href=mlhd_12mo615p396zh7t4fk0x_1.html>JCG-51.软件许可协议(三方)</a></li><li><a title="环境监测选择题题目" href=mlhd_201sg966nh8uhsm07rsw_3.html>环境监测选择题题目</a></li><li><a title="公路改建工程监理规划146页(最终版、资料完整)" href=mlhd_4icld5y3vb3pit886asl2xn8u9whcj004c2_1.html>公路改建工程监理规划146页(最终版、资料完整)</a></li> </ul></div><div style="margin:0 auto;text-align:center;"><br> </div></div></div></div> <div class="nlt new"><div id="hm_t_19094"><div class="hm-t-container"><div class="hm-t-main"> <div class="hm-t-header"><h4>最新搜索</h4></div> <ul class="hm-t-list hm-t-list-txt"> <li><a title="麻城市城市总体规划(2012-2030)" href="mlhs_vcrhceikihceikij0bfo3r7og7m01401e01c01d01e01901e01c01f01c015_1.html">麻城市城市总体规划(2012-2030)</a></li><li><a title="学生处08年工作总结(081225定稿)" href="mlhs_i1yn4vhl001c01kinoijpfocj0bp1v01401c01k01d01e01e01hi3eo5b015_1.html">学生处08年工作总结(081225定稿)</a></li><li><a title="松香" href="mlhs_kfyuc9_1.html">松香</a></li><li><a title="农村信用社对账实施细则 " href="mlhs_g4ckepfs1n54ny6i61rvqi3ik3hp1ig7t00w00w00w00w00w00w00w00w00w00w00w00w00w00w00w00w00w00w00w_1.html">农村信用社对账实施细则 </a></li><li><a title="第一节 蛋白质结构与功能" href="mlhs_obwfeops200wqmjnelrvsp1vkg4ff2gbjph9_1.html">第一节 蛋白质结构与功能</a></li><li><a title="固定资产投资年度形势分析(doc 10页)(全面版)" href="mlhs_h6ii3erwkfjbjh1rwkinoip2iuagcfg7akgg01402s03302r00w01d01cu45015014g2wtwimko015_1.html">固定资产投资年度形势分析(doc 10页)(全面版)</a></li><li><a title="学校安全工作责任清单" href="mlhs_i1ykkhi2xg2wijpfocrvnflnlqdggl_1.html">学校安全工作责任清单</a></li><li><a title="2014-2019年中国汽车整车制造行业分析及投资前景研究报" href="mlhs_01e01c01d01g01901e01c01d01linoffxh6llfhsbqk1gsbqg8msgwqx8ffeg7akgggjujh1rwkg99k8fnpwo6ujhh_1.html">2014-2019年中国汽车整车制造行业分析及投资前景研究报</a></li><li><a title="咬合桩施工工艺" href="mlhs_gq4glkkmhk3hijpijppru_1.html">咬合桩施工工艺</a></li><li><a title="2016年公需《电子商务》答案" href="mlhs_01e01c01d01iinog30tts9hmn5hi1cguegbl9hnod0klk_1.html">2016年公需《电子商务》答案</a></li></ul></div></div></div></div> <div class="search"> <form style="display: inline;" id=f1 name=f1 method="POST" onSubmit="javascript:c();return false;"> <div class="p_searchinputbox"> <div class="p_search_seclet"><h3 id="j_searchType">站内搜索</h3></div><p> <input type="text" autocomplete="off" maxlength="38" name="word" placeholder class="searchinput"></p> <input type="submit" class="searchsubmit" onclick="javascript:c();return false;"></div> </form> </div> <div id="ft"> <a href="javascript:history.go(-1)"><span class="backPrevPage" style=""></span></a> <a href="javascript:pageScroll();"><span id="backTop"></span></a> <div class="bx1"> <span class="pc_ver"> <a href="#" onClick="javascript:setCookie('gotoweb', 'true', 1);window.location.href=window.location.href.replace('//m.','//www.').replace('/m','/')">电脑版</a> </span> <span class="info"> <a href="about.asp?id=3" target="_blank"><strong>关于南京廖华答案网</strong></a> </span> </div> <div class="bx2"><span id=bb></span>联系客服:779662525#qq.com(#替换为@) <a href="https://beian.miit.gov.cn/" target="_blank" class="text">苏ICP备20003344号-4</a></div> </div> <!-- footer End --></div> <script type="text/javascript">function go2(id){window.location.href='http://m.35331.cn/mlhdl_'+id+'.html';}</script> <script src="css/jquery.min.js"></script> </body></html>