struts2零配置Action路径到Result页面路径的自动映射.docVIP

  • 7
  • 0
  • 约8.15千字
  • 约 7页
  • 2017-02-16 发布于北京
  • 举报

struts2零配置Action路径到Result页面路径的自动映射.doc

Struts2约定优于配置 (Action路径到Result页面路径的自动映射) Convention插件 需要的jar包struts2-convention-plugin-2.2.1.jar 设置Convention结果[result页面存放路径目录] struts-plugin.xml文件中: constant name=struts.convention.result.path value=/WEB-INF/content// 默认所有的结果页面都存储在WEB-INF/content下,通过设置struts.convention.result.path属性的值改变结果页面到其他路径。如:Xml代码 constant name=struts.convention.result.path value=/WEB-INF/page / 则将路径配置到了WEB-INF/page 下constant name=struts.convention.result.path value=/page / 则将路径配置到了/page下。Action类路径struts-plugin.xml文件中: constant name=struts.convention.package.locators value=action,actions,struts,struts2/ 默认包路径包含action,

文档评论(0)

1亿VIP精品文档

相关文档