文章分类 -  struts2

摘要:1.创建资源文件,文件名格式:文件基名_语言代码_国家代码.properties2.在struts.properties或者sturts.xml中配置常量struts.custom.i18n.resources=文件基名3.使用: (1). (2). (3). (4).Action中使用:必... 阅读全文
posted @ 2015-12-26 16:31 Runny_Hao 阅读(101) 评论(0) 推荐(0)
摘要:1.使用模型驱动 ModleDriver 要求 1.要求Action必须实现一个接口ModelDriven. 重写getModel()方法. 2.要求在Action中必须实例化一个javaBean对象. 在getModel方法中将这个实例化后的对象返回.注意:如果有嵌套... 阅读全文
posted @ 2015-12-20 19:10 Runny_Hao 阅读(111) 评论(0) 推荐(0)
摘要:1.web.xml中配置: struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter配置Struts2框架默认加载的Action包结构 actionPackages cn.itcast.cont... 阅读全文
posted @ 2015-12-20 13:47 Runny_Hao 阅读(119) 评论(0) 推荐(0)