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="2015-2020年中国环境质量检测市场发展现状及市场评估报告" href=mlhd_7rksx7dz3i9pg7y7h9u6_3.html>2015-2020年中国环境质量检测市场发展现状及市场评估报告</a></li><li><a title="锂离子电池导电剂一览表" href=mlhd_7xv753daey9s4tl8l1hs_1.html>锂离子电池导电剂一览表</a></li><li><a title="土力学与基础工程课后答案()" href=mlhd_2f3yh6mbxm5zpak1cslt1is53085cn00i7v_7.html>土力学与基础工程课后答案()</a></li><li><a title="装配流水线控制系统的设计分解" href=mlhd_6wk5m2tlg35136q5t3t485bn78arf200ckp_1.html>装配流水线控制系统的设计分解</a></li><li><a title="【推荐精选】2018年中考物理 机械能和内能专题专测练习卷" href=mlhd_20jjt6owxw7b3ef97wu606i7k4fff900zjm_1.html>【推荐精选】2018年中考物理 机械能和内能专题专测练习卷</a></li><li><a title="人教版《秋兴八首》优质课 优秀教案" href=mlhd_6hd2v3ln5f03gjy5zd2f62h6002tp400l86_1.html>人教版《秋兴八首》优质课 优秀教案</a></li><li><a title="第七章 相关与回归分析s" href=mlhd_23ar290iz66bod14q6zh_1.html>第七章 相关与回归分析s</a></li><li><a title="云南重点项目-五味子种植及深加工项目可行性研究报告" href=mlhd_2aeab1fpwz2r4yi9c24x_2.html>云南重点项目-五味子种植及深加工项目可行性研究报告</a></li><li><a title="公路与市政工程预算定额分析对比" href=mlhd_6zrnq7bu7v9vfqx3d4pq7px008twst015b7_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="单片机原理及接口技术复习要点" href="mlhs_gglmknke2ginmx2gjujolgkjjggkdrhl9fhcr5tm9l_1.html">单片机原理及接口技术复习要点</a></li><li><a title="2018年全国中考语文试题分类汇编01:字音" href="mlhs_01e01c01d01kinog2wh6lffxpabrn1k1zrmdu54g7aol7ldzp3q01c01d01mi1ju0j_1.html">2018年全国中考语文试题分类汇编01:字音</a></li><li><a title="学会质疑方法" href="mlhs_i1yfmirvsn81k3dlhx_1.html">学会质疑方法</a></li><li><a title="派出所反恐工作总结" href="mlhs_lkug6yjeogjxj0wijpfocj0bp1v_1.html">派出所反恐工作总结</a></li><li><a title="立式注塑机安全操作规程" href="mlhs_o97irzlighg1ke2i2xg2wjwtfocr7oo3v_1.html">立式注塑机安全操作规程</a></li><li><a title="园本教研总结" href="mlhs_h65kdok0pnpwj0bp1v_1.html">园本教研总结</a></li><li><a title="内筒支撑板冲压模具设计说明书" href="mlhs_g3pocyjzjjv5kfzg4ygi3kypg3brlqrkxrn8k5qfhi_1.html">内筒支撑板冲压模具设计说明书</a></li><li><a title="四年级下册科学全册教案(含-教学反思)" href="mlhs_h5ninop0nfezg3wo29i1yg2wg3wk0pklk014gmj019k0pi1ygjxizh015_1.html">四年级下册科学全册教案(含-教学反思)</a></li><li><a title="第七章氧化还原平衡电化学" href="mlhs_obwfero9sld3geusewgininnqxtn5hgeui1y_1.html">第七章氧化还原平衡电化学</a></li><li><a title="19 钱学森" href="mlhs_01d01l00wtddi1ykq6_1.html">19 钱学森</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>