关于 在struts2里 使用 通配符的问题!it's necessary for web!

来源:互联网 发布:tonymoly的rd03是mac 编辑:程序博客网 时间:2024/04/27 23:56

if you are doing your webwork ,and touched a nests problem, many methods  mapping to  one action,

you  should use {} and * for it,which way can make you easy to work.

let's see how to use it.

when your Acntionname is LoginAction  and it has been controlled by your springframework,try to mark it be login,

and action name is "login_*" with method="{1},so the * is mapping your methods in your LoginAction,and they will be

getby the 

com.opensymphony.xwork2.DefaultActionInvocation.invokeAction and
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter
while you do it in this way,your jsppage should be write action="login_?";

0 0
原创粉丝点击