您的位置:首页 > 编程语言 > Java开发

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

2014-04-20 18:16 489 查看
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_?";[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐