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

浙公网安备 33010602011771号