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="2019年云计算考试题题库" href=mlhd_8fva448dup6u75f0b3w102ra61x73m01dfq_1.html>2019年云计算考试题题库</a></li><li><a title="RJ四年级语文上册古诗两首《题西林壁》等教案" href=mlhd_02gl83yqpv8c83g0eooc_1.html>RJ四年级语文上册古诗两首《题西林壁》等教案</a></li><li><a title="水利工程五大员试题及答案 完整" href=mlhd_1380e64u3v6tzp833x6r_1.html>水利工程五大员试题及答案 完整</a></li><li><a title="中考物理实验专题复习——特殊方法测电功率" href=mlhd_5borz2za4779c964hjsm5kaxd91bpl00kwp_1.html>中考物理实验专题复习——特殊方法测电功率</a></li><li><a title="高分子材料工程专业英语翻译" href=mlhd_3wn3t2k9rl4zk8n0i2fb_5.html>高分子材料工程专业英语翻译</a></li><li><a title="精编统编版四年级上册语文1——8单元测试卷含答案部编版" href=mlhd_8bu7n2q2gj2r4yi9c8hj79c964hjzq00li3_3.html>精编统编版四年级上册语文1——8单元测试卷含答案部编版</a></li><li><a title="复习资料化工原理下试卷" href=mlhd_4s3ro4bf8p57ejb0pt6v_1.html>复习资料化工原理下试卷</a></li><li><a title="岗位安全操作规程编写六要素" href=mlhd_7ldko1m3cx03ypi6bk157e16g2f4sy00oqr_1.html>岗位安全操作规程编写六要素</a></li><li><a title="基于单片机的数字音乐盒设计_单片机课程设计" href=mlhd_3srt73zu980mq5e7eayt5nd0e7n2yj0179j_1.html>基于单片机的数字音乐盒设计_单片机课程设计</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="基于VB实现台达PLC与PC-机串行通讯" href="mlhs_hdmfim02e01ui3imuogkwse602802401vff202801v019ke2fg2qx8sgqrlb_1.html">基于VB实现台达PLC与PC-机串行通讯</a></li><li><a title="环境经济学复习题与答案详解" href="mlhs_munhhfp1rllai1yhl9fhcu54ff2od0klkrmur8j_1.html">环境经济学复习题与答案详解</a></li><li><a title="地质调查技术标准目录" href="mlhs_h80rvsrnnkitjggkdrkjrg5inhqitx_1.html">地质调查技术标准目录</a></li><li><a title="全球及中国停车场市场深度调研及投资可行性预测咨询报告" href="mlhs_g2wmwzgjuffxh6lfvgsbqh8aikih8alptip2rnnnpwgjujh1rwkgkvqx8izru4kll7gq0rmqjhhgne_1.html">全球及中国停车场市场深度调研及投资可行性预测咨询报告</a></li><li><a title="机动车传动系统设计指南" href="mlhs_ke2gbssbqfmogbsoorp27rlqrkxjk7ggn_1.html">机动车传动系统设计指南</a></li><li><a title="会" href="mlhs_fmi_1.html">会</a></li><li><a title="城市给水工程专项规划编制纲要" href="mlhs_hceikip21ldgijpo3vff7u49r7og7mp3qg8mp0yr5t_1.html">城市给水工程专项规划编制纲要</a></li><li><a title="内蒙古自治区婚前医学检查管理办法" href="mlhs_g3pq6xgkkpnulh7gfuhuig99gfvi1ykowkitof5mx2gbilhx_1.html">内蒙古自治区婚前医学检查管理办法</a></li><li><a title="2016.2年中级职称计算机考试模拟题库及答案解析" href="mlhs_01e01c01d01i01a01einoffxp0npcco34rkxoevke2pabrmdkypjj3u54iojgjuod0klkr8jkgg_1.html">2016.2年中级职称计算机考试模拟题库及答案解析</a></li><li><a title="化工园区安全规划工作的开展措施" href="mlhs_geuijph65gfui2xg2wr7og7mijpfocnesirki8ljoqk3h_1.html">化工园区安全规划工作的开展措施</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>