关于dispatchAction
如果dispatchAction的子类覆写了dispatchAction中的execute方法,则最后一定要调用super.execute()方法,否则,DispatchAction会失效,
配置:
<action path="/"
type=""
name=""
scope="request"
parameter="method" //parameter的值必须和请求对应的那个一样,eg: <a href="org.do?method=方法名"
>
关于dispatchAction中的unspecified方法的含义:当没有传递方法名过来的时候执行此方法。
本文详细介绍了Struts2框架中DispatchAction的作用及使用方法。重点解释了如何正确覆盖execute方法并确保调用了super.execute(),以维持DispatchAction的功能。此外还探讨了unspecified方法的用途,即在未指定具体方法时的默认行为。
1151

被折叠的 条评论
为什么被折叠?



