struts配置文件action的parameter属性是给DispatchAction使用的,你的类要继承DispatchAction类,而不是普通的Action,Action只会执行execute方法,DispatchAction会根据parameter的值执行特定的方法,注意 parameter的值不要设置为execute,也不要覆盖DispatchAction中的execute(),因为DispatchAction继承于Action,它的execute会首先执行,在execute()方法中取出parameter的值,通过java反射调用指定的方法。
struts配置文件action的parameter
最新推荐文章于 2024-04-01 00:57:53 发布
本文介绍了Struts配置文件中action的parameter属性的使用方法。要使用此属性,类必须继承自DispatchAction而非普通的Action。DispatchAction根据parameter的值执行相应的方法,并通过反射机制调用指定方法。

5340

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



