struts2 Codebehind Plugin
日期:2011-11-09
点击:165
来源: 未知
分享至:
1.为未定义的action指定mapping
When no explicitly configured Action can be found for a request, the plugin searches the web application for a likely page. Specifically, the following pattern is used to locate a page:
/NAMESPACE/ACTION.(jsp|vm|ftl)
For example, if the request is for http://www.company.com/myapp/member/login.action, the plugin will look for the following pages, in this order:
/member/login.jsp
/member/login.vm
/member/login.ftl
2.为未指定result的action自动寻找页面
When no explicitly configured Result is found for an Action's result code, the plugin, again, searches the web application for a matching page. Specifically, the following patterns, in the following order, are used to locate a page:
/NAMESPACE/ACTION-RESULT_CODE.(jsp|vm|ftl)
/NAMESPACE/ACTION.(jsp|vm|ftl)
These two patterns are searched for each of the three default page extensions: jsp, vm, and ftl. For example, if the request is for http://www.company.com/myapp/member/login.action, so that the action name is login and the namespace is member, and the Action class returned a code of success, the plugin will look for the following pages, in this order:
/member/login-success.jsp
/member/login.jsp
/member/login-success.vm
/member/login.vm
/member/login-success.ftl
/member/login.ftl
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史